Browse Source

提交代码

zh
杨豪 3 years ago
parent
commit
4e60bca597
  1. 3
      common/config.js
  2. 8
      manifest.json
  3. 142
      pages/index/addTask.vue
  4. 4
      pages/my/index.vue

3
common/config.js

@ -1,5 +1,6 @@
// const ROOTPATH1 = "http://192.168.0.112:8891/sqx_fast";
const ROOTPATH1 = "http://192.168.0.111:8891/sqx_fast";
// const ROOTPATH1 = "http://192.168.0.111:8891/sqx_fast";
const ROOTPATH1 = "https://fanqie.app.cyjyyjy.com/sqx_fast";
// const ROOTPATH1 = "http://192.168.1.17:8891/sqx_fast";
const ROOTPATH = "https://shop.canmoujiang.com/sqx_fast";
module.exports = {

8
manifest.json

@ -1,5 +1,5 @@
{
"name" : "餐谋匠吃货圈",
"name" : "番茄商家版",
"appid" : "__UNI__uni_sqx",
"description" : "",
"versionName" : "1.0.6",
@ -146,7 +146,11 @@
"provider" : "wx63ffb7b7894e99ae"
}
},
"permission" : {}
"permission" : {
"scope.userLocation" : {
"desc" : "获取您当前位置进行定位操作"
}
}
},
"mp-alipay" : {
"usingComponents" : true

142
pages/index/addTask.vue

@ -35,11 +35,46 @@
<!-- <input type="digit" v-model="money" class="input" maxlength="9" :placeholder="jineplaceName" /> -->
</view>
</view>
<view class="order-des">
<!-- <view class="order-des">
<view class="title">返现金额(每单)</view>
<view class="textarea-wrap">
<input type="digit" v-model="money" class="input" maxlength="9" :placeholder="jineplaceName" />
<input type="digit" v-model="merchantMoney" class="input" maxlength="9" :placeholder="jineplaceName" />
</view>
</view> -->
<view class="order-des">
<view class="title">满返金额</view>
<view class="textarea-wrap special-box">
<text></text>
<input type="digit" v-model="memberPrice" class="input" maxlength="9" placeholder="请输入金额要求" />
<text></text>
<input type="digit" v-model="merchantMoney" class="input" maxlength="9" :placeholder="jineplaceName" />
</view>
</view>
<!-- <view class="order-des">
<view class="title">会员满返</view>
<view class="textarea-wrap special-box">
<text></text>
<input type="digit" v-model="memberPrice" class="input" maxlength="9" placeholder="请输入金额要求" />
<text></text>
<input type="digit" v-model="memberMoney" class="input" maxlength="9" placeholder="请输入优惠金额" />
</view>
</view>
<view class="order-des">
<view class="title">普通用户满返</view>
<view class="textarea-wrap special-box">
<text></text>
<input type="digit" v-model="price" class="input" maxlength="9" placeholder="请输入金额要求" />
<text></text>
<input type="digit" v-model="money" class="input" maxlength="9" placeholder="请输入优惠金额" />
</view>
</view> -->
<view class="order-des">
<view class="title">任务分类</view>
<checkbox-group @change="fromTypeChange" v-model="fromType">
<label v-for="item in fromTypeList" :key="item.id" style="font-size: 24rpx;">
<checkbox :value="item.id" :checked="fromType.includes(item.id+'')" /><text>{{item.name}}</text>
</label>
</checkbox-group>
</view>
<view class="order-des">
<view class="title">接单数量(每日)</view>
@ -142,7 +177,11 @@
startingTime: '',
closingTime: '',
merchantId: 0,
merchantMoney:'',
money: '',
price: '',
memberMoney: '',
memberPrice: '',
orderId: '', //ID
show: false,
show1: false,
@ -164,6 +203,9 @@
name: '美团'
}
],
showPlatform: false,
fromTypeList:[],
fromType: [],
params: {
year: true,
month: true,
@ -188,6 +230,19 @@
this.checkMerchant();
let that = this;
//
that.$Request.getT('/helpClassify/selectClassifyList').then(res => {
if (res.code == 0) {
this.fromTypeList = res.data.filter(item=> {
if(item.state == 1){
item.name = item.classifyName
item.value = item.id
return item
}
})
}
});
that.$Request.getT('/common/type/149').then(res => {
if (res.code == 0) {
if (res.data && res.data.value) {
@ -244,6 +299,9 @@
//
openMsg() {
},
fromTypeChange(e){
this.fromType = e.detail.value
},
checkMerchant() {
let userId = this.$queue.getData('userId');
@ -258,10 +316,13 @@
if (res.code == 0) {
this.merchantId = res.data.merchantId;
this.title = res.data.goodsTitle;
this.money = res.data.merchantMoney;
this.merchantMoney = res.data.merchantMoney;
this.money = res.data.money;
this.price = res.data.price;
this.memberPrice = res.data.memberPrice;
this.memberMoney = res.data.memberMoney;
this.serviceMoney = res.data.serviceMoney ? res.data.serviceMoney : 0;
this.WeeklyNum = res.data.numStar;
this.upImageNum = res.data.numImg;
this.commentNum = res.data.numWord;
@ -271,8 +332,6 @@
this.pingjiaName = this.pingjialist[0].name;
}
this.DistributionNum = res.data.scope;
this.ReceivingNum = res.data.sumNum;
this.startTime = res.data.startTime;
@ -280,7 +339,8 @@
this.imageList.push(res.data.titleImg);
this.platform = res.data.classify == 1 ? '饿了么' : '美团';
this.platformId = res.data.classify;
this.fromType = res.data.activityIds.split(','); //
console.log(this.fromType)
// let asd = res.data.startTime.substring(0,10).replace(/-/g,"")
// console.log(res.data.startTime.substring(0,10).replace(/-/g,""))
// console.log(res.data.endTime.substring(0,10).replace(/-/g,""))
@ -369,18 +429,46 @@
this.$queue.showToast('请输入配送范围!');
return;
}
if (this.money == '') {
if (this.memberPrice == '') {
uni.hideLoading();
this.$queue.showToast('请输入满足金额');
return;
}
// if (this.memberMoney == '') {
// uni.hideLoading();
// this.$queue.showToast('');
// return;
// }
// if (this.price == '') {
// uni.hideLoading();
// this.$queue.showToast('');
// return;
// }
// if (this.money == '') {
// uni.hideLoading();
// this.$queue.showToast('');
// return;
// }
if (this.merchantMoney == '') {
uni.hideLoading();
this.$queue.showToast('请输入返现金额');
return;
}
if (this.money < this.zuidi) {
if (this.merchantMoney < this.zuidi) {
uni.hideLoading();
this.$queue.showToast('每单最低返现金额为' + this.zuidi + '元');
return;
}
if(this.fromType.length == 0){
uni.hideLoading();
this.$queue.showToast('请选择任务分类');
return;
}
if (this.ReceivingNum == '') {
uni.hideLoading();
@ -410,6 +498,11 @@
'userId': userId,
'merchantId': this.merchantId,
'goodsTitle': this.title,
money: this.money,
price: this.memberPrice,
memberMoney: this.memberMoney,
memberPrice: this.memberPrice,
activityIds: this.fromType.toString(),
// 'titleImg': images,
// 'img': images1,
'sumNum': this.ReceivingNum,
@ -417,7 +510,7 @@
'endTime': this.endTime + ' ' + '23:59:59',
'classify': this.platformId,
// 'typeId': this.pinleiId,
"merchantMoney": this.money,
"merchantMoney": this.merchantMoney,
"numImg": this.upImageNum,
"numStar": this.WeeklyNum,
"numWord": this.commentNum,
@ -427,11 +520,11 @@
}
uni.hideLoading();
// let shijiancha = this.DateDiff(this.startTime, this.endTime);
let zongjine = this.money * this.ReceivingNum * this.sjcNumber;
let zongjine = this.merchantMoney * this.ReceivingNum * this.sjcNumber;
let urlContent = '您发布活动的时间期限为' + this.sjcNumber + '天,发布总金额' + zongjine + '元,并且活动一经发布,不可取消!';
if (this.serviceMoney != 0) {
// zongjine = zongjine + fuwufei;
let fuwufei = (this.serviceMoney * this.ReceivingNum * this.sjcNumber) + (this.money * this.ReceivingNum *
let fuwufei = (this.serviceMoney * this.ReceivingNum * this.sjcNumber) + (this.merchantMoney * this.ReceivingNum *
this.sjcNumber);
urlContent = '您发布活动的时间期限为' + this.sjcNumber + '天,发布总金额' + fuwufei + '元,(含' + this.serviceMoney +
'元每单服务费)并且活动一经发布,不可取消!';
@ -637,6 +730,17 @@
page {
width: 100%;
}
checkbox .wx-checkbox-input {
transform: scale(0.7);
// border-radius: 50% !important;
/* color: #ffffff !important; */
}
checkbox .wx-checkbox-input.wx-checkbox-input-checked {
color: #fff;
background: #FF4701!important;
border-color: #FF4701 !important;
}
.container {
width: 100%;
@ -684,6 +788,17 @@
margin-top: 10upx;
}
}
.special-box{
display: flex;
align-items: center;
text{
color: #FF4701;
}
input{
width: 40%;
margin-left: 6rpx;
}
}
.order-list {
margin-top: 20upx;
@ -726,7 +841,6 @@
border-bottom: 0;
}
}
}
.btns {

4
pages/my/index.vue

@ -302,7 +302,7 @@
if (res.code === 0) {
this.money = res.data.cannotMoney ? res.data.cannotMoney : 0;
this.cashMoney = res.data.mayMoney ? res.data.mayMoney : 0;
this.myMoney = parseFloat(this.money) + parseFloat(this.cashMoney);
this.myMoney = (parseFloat(this.money) + parseFloat(this.cashMoney)).toFixed(2);
}
});
},
@ -431,7 +431,7 @@
let token = this.$queue.getData('token');
if (token) {
// if (this.MerchantList == 1) {
if (url == "../activity/index") {
if (url == "../activity/index" || url == "/pages/my/toExamine") {
uni.switchTab({
url: url
})

Loading…
Cancel
Save