Browse Source

上传代码

lk
kk_888 3 years ago
parent
commit
661ea8f1c9
  1. 2
      common/config.js
  2. 21
      components/chose-city/chose-city.vue
  3. 35
      components/mask/task-home-list1.vue
  4. 728
      pages/index/index.vue
  5. 9
      pages/index/taskDetail.vue
  6. 2
      pages/my/index.vue

2
common/config.js

@ -1,4 +1,4 @@
const ROOTPATH1 = "http://192.168.0.112:8891/sqx_fast"; const ROOTPATH1 = "http://192.168.0.111:8891/sqx_fast";
const ROOTPATH = "https://bwc.xianmxkj.com/sqx_fast"; const ROOTPATH = "https://bwc.xianmxkj.com/sqx_fast";
module.exports = { module.exports = {
APIHOST: ROOTPATH, APIHOST: ROOTPATH,

21
components/chose-city/chose-city.vue

@ -114,11 +114,12 @@
cityJson.forEach(d => { cityJson.forEach(d => {
this.cityList.push(d); this.cityList.push(d);
}) })
console.log(JSON.stringify(this.cityList)) console.log(JSON.stringify(this.cityList),'iiiii')
}, },
watch: { watch: {
// //
inputValue(newVal) { inputValue(newVal) {
console.log(newVal);
this.isClearBtn = newVal ? true : false; this.isClearBtn = newVal ? true : false;
if (this.timer) { if (this.timer) {
@ -129,14 +130,19 @@
this.searchData = []; this.searchData = [];
return; return;
} }
console.log(this.cityList,'mmmmm')
this.timer = setTimeout(() => { this.timer = setTimeout(() => {
const result = []; const result = [];
this.cityList.map(v => { this.cityList.map(v => {
v.children.forEach((item) => { console.log(v)
if (item.name.includes(this.inputValue)) { if (v.name.includes(this.inputValue)) {
result.push(item); result.push(v);
} }
}); // v.children.forEach((item) => {
// if (item.name.includes(this.inputValue)) {
// result.push(item);
// }
// });
}) })
this.searchData = result; this.searchData = result;
if (this.searchData.length === 0) { if (this.searchData.length === 0) {
@ -159,7 +165,7 @@
console.log(res); console.log(res);
console.log('省份数据:', res.result[0]); // console.log('省份数据:', res.result[0]); //
console.log('城市数据:', res.result[1]); // console.log('城市数据:', res.result[1]); //
// _this.cityList = res.result[1]; _this.cityList = res.result[1];
}, },
fail: function(error) { fail: function(error) {
console.error(error); console.error(error);
@ -260,6 +266,7 @@
value value
} = e.detail; } = e.detail;
this.inputValue = value; this.inputValue = value;
}, },
// //
touchStart(e) { touchStart(e) {

35
components/mask/task-home-list1.vue

@ -13,13 +13,16 @@
<image v-if="item.classify == 1" class="item-Logo" mode="widthFix" <image v-if="item.classify == 1" class="item-Logo" mode="widthFix"
src="/static/img/my/eleicon.png"></image> src="/static/img/my/eleicon.png"></image>
<view class="tag-titles">{{item.goodsTitle}}</view> <view class="tag-titles">{{item.goodsTitle}}</view>
<view class="item-weizhi">{{item.city}}{{item.address}}</view>
</view> </view>
<view class="item-wz"> <view class="item-wz">
<view style="width: 63%;display: flex;;"> <view style="width: 63%;display: flex;;">
<view style="width: 8%;"> <!-- <view style="width: 8%;">
<image src="../../static/img/home/weizhi.png" class="weizhi"></image> <image src="../../static/img/home/weizhi.png" class="weizhi"></image>
</view> </view>
<view class="item-weizhi">{{item.city}}{{item.address}}</view> <view class="item-weizhi">{{item.city}}{{item.address}}</view> -->
<view class="item-yu" v-if="item.endNum > 0">剩余{{item.endNum}}</view>
</view> </view>
<view v-if="item.distance" class="item-juli">距离{{item.distance}}</view> <view v-if="item.distance" class="item-juli">距离{{item.distance}}</view>
</view> </view>
@ -30,21 +33,21 @@
<view class='tag-item-orange'>非会员满{{item.price}}{{item.money}}</view> <view class='tag-item-orange'>非会员满{{item.price}}{{item.money}}</view>
</view> </view>
</view> </view>
<view style="border:1upx solid #f1f1f1;margin: 30rpx 0 20rpx;"></view> <!-- <view style="border:1upx solid #f1f1f1;margin: 30rpx 0 20rpx;"></view> -->
<view style="display: flex;width: 100%;"> <!-- <view style="display: flex;width: 100%;">
<view class="avatar"> <view class="avatar">
<view class="item-money" style="align-items: center;"> <view class="item-money" style="align-items: center;"> -->
<image style="width: 32rpx;height: 32rpx;margin-right: 6upx;" <!-- <image style="width: 32rpx;height: 32rpx;margin-right: 6upx;"
src="../../static/img/home/yingbi.png"></image> src="../../static/img/home/yingbi.png"></image> -->
<view class="jinbi-num">{{item.memberMoneys}}</view> <!-- <view class="jinbi-num">{{item.memberMoneys}}</view> -->
<view class="item-yu" v-if="item.endNum > 0">剩余{{item.endNum}}</view> <!-- <view class="item-yu" v-if="item.endNum > 0">剩余{{item.endNum}}</view>
<view class="item-yu" v-else>已售罄</view> <view class="item-yu" v-else>已售罄</view>
</view> </view>
</view> </view> -->
<view class="baoming">报名</view> <!-- <view class="baoming">报名</view> -->
<!-- <view class="date">结束时间: {{item.endTime}}</view> --> <!-- <view class="date">结束时间: {{item.endTime}}</view> -->
<!-- <view style="width: 40%;text-align: right;font-size: 28rpx;color: #FD6416;" v-if="item.channelMoney">每单返{{item.channelMoney}}积分</view> --> <!-- <view style="width: 40%;text-align: right;font-size: 28rpx;color: #FD6416;" v-if="item.channelMoney">每单返{{item.channelMoney}}积分</view> -->
</view> <!-- </view> -->
</view> </view>
</view> </view>
</block> </block>
@ -125,7 +128,7 @@
// padding: 0 30upx; // padding: 0 30upx;
// width: 100%; // width: 100%;
width: 690rpx; width: 690rpx;
height: 311rpx; height: 230rpx;
margin: 0 30rpx; margin: 0 30rpx;
position: relative; position: relative;
background: #FFFFFF; background: #FFFFFF;
@ -179,7 +182,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
position: relative; position: relative;
margin-top: 10upx; margin-top: 20upx;
color: #999; color: #999;
font-size: 20upx; font-size: 20upx;

728
pages/index/index.vue

@ -3,7 +3,7 @@
<view class="containertop"> <view class="containertop">
<view class="nav"> <view class="nav">
<view @click="goSelectCity()" class="citys" style="margin-right: 5px;"> <view @click="goSelectCity()" class="citys" style="margin-right: 5px;">
<p>武汉光谷<u-icon name="arrow-down-fill" style="font-size: 8px;margin-left: 2px;"></u-icon> <p>{{cityname}}<u-icon name="arrow-down-fill" style="font-size: 8px;margin-left: 2px;"></u-icon>
</p> </p>
</view> </view>
<view class="search" style="margin-left: 2px;"> <view class="search" style="margin-left: 2px;">
@ -67,25 +67,24 @@
</view> </view>
<view class="shoplist"> <view class="shoplist">
<view class="shop" @click="totasks()"> <view class="shop" @click="totasks()" v-for="(item,index) in shoplist" :key="index">
<view class="message" style="position: relative;"> <view class="message" style="position: relative;">
<view class="pic" style="position: relative;z-index:1;margin-left: 10px;margin-top: 4px;"> <view class="pic" style="position: relative;z-index:1;margin-left: 10px;margin-top: 4px;">
<image src="../../static/img/home/coco.png"></image> <image :src="shoplist.imageUrl"></image>
</view> </view>
<view class="text" style="position: relative;z-index:1;margin-top: 6px;"> <view class="text" style="position: relative;z-index:1;margin-top: 6px;">
<view> <view>
<p style="float: left;">coco奶茶店</p> <p style="float: left;">{{shopname}}</p>
<u-tag text="虎泉" size="mini" mode="dark" type="error" <u-tag text="虎泉" size="mini" mode="dark" type="error"
style="float: right;margin-right: 40px;margin-top: 6px;" /> style="float: right;margin-right: 40px;margin-top: 6px;" />
</view> </view>
<view> <view>
<view style="float: left;">剩余</view> <view style="float: left;">剩余</view>
<view style="float: left;color: #FF0000;margin-top: 2px;">{{number}}</view> <view style="float: left;color: #FF0000;margin-top: 2px;">{{endNum}}</view>
</view> </view>
<view>222</view> <view>222</view>
</view> </view>
</view> </view>
<!-- <view class="logo m"><image src="../../static/img/home/meituan.png"></image></view> --> <!-- <view class="logo m"><image src="../../static/img/home/meituan.png"></image></view> -->
<!-- <view class="logo e"><image src="../../static/img/home/elme.png"></image></view> --> <!-- <view class="logo e"><image src="../../static/img/home/elme.png"></image></view> -->
@ -94,6 +93,16 @@
<view class="bottom"><image src="../../static/img/home/meituan.png"></image></view> <view class="bottom"><image src="../../static/img/home/meituan.png"></image></view>
</view> </view>
</view> </view>
<view class="root" style="margin-top: 10upx;" v-if="filterData.length > 1">
<ren-dropdown-filter v-if="filterData.length > 1" :filterData='filterData' @click="navClick"
:defaultIndex='defaultIndex' @ed='ed' @dateChange='dateChange'></ren-dropdown-filter>
</view>
<view class="card-box" v-if="goodsHomeList.length > 0">
<task-home-list class="task-home" splitLine @click="clickItem" :list="goodsHomeList"></task-home-list>
</view>
<view v-if="goodsHomeList.length > 0">
<load-more :loadingType="loadingType" :contentText="contentText"></load-more>
</view>
</view> </view>
</view> </view>
@ -111,32 +120,12 @@
}, },
data() { data() {
return { return {
number: 4, endNum: 0,
shopname:'',
keyword: '', keyword: '',
value1: 1, value1: 1,
value2: 2, value2: 2,
items: [{ cityname:'武汉',
text: "一年级",
value: "1-0",
children: [{
text: "1.1班",
value: "1-1"
},
{
text: "1.2班",
value: "1-2"
}
]
},
{
text: "二年级",
value: "2-0"
},
{
text: "三年级",
value: "3-0"
}
],
listbanner: [{ listbanner: [{
image: 'https://cdn.uviewui.com/uview/swiper/1.jpg', image: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
title: '昨夜星辰昨夜风,画楼西畔桂堂东' title: '昨夜星辰昨夜风,画楼西畔桂堂东'
@ -172,24 +161,699 @@
value: 2, value: 2,
} }
], ],
shoplist:[
],
localCampus: '未知',
city: '',
meituanList: {},
elemeList: {},
banners: [],
latitude: '',
longitude: '',
mtelmCheck: '',
authorize: false,
weizhinames: '',
weizhidizhi: '',
categoryHeight: '320rpx', //
currentPageindex: 0, //
navlist: [],
sortType: 0,
typeId: 0,
recommendList: [],
content: "",
phone: "",
isDisable: false,
tuijianList: [],
goodsHomeList: [],
page: 1,
limit: 10,
loadingType: 0,
contentText: {
contentdown: '上拉显示更多',
contentrefresh: '正在加载...',
contentnomore: '没有更多数据了'
},
filterData: [
[{
text: '综合分类',
value: ''
}, {
text: '返现最高',
value: 1
}, {
text: '最新发布',
value: 2
}, {
text: '距离最近',
value: 3
}]
],
defaultIndex: [0, 0],
arr: [],
showModal: true
}
},
onLoad(e) {
let that = this;
if (e.userByinvitationId) {
this.$queue.setData('userByinvitationId', e.userByinvitationId);
}
// #ifdef MP-WEIXIN
if (e.scene) {
const scene = decodeURIComponent(e.scene);
this.$queue.setData('userByinvitationId', scene.split(',')[0]);
}
// #endif
// #ifdef MP-WEIXIN
// API
qqmapsdk = new QQMapWX({
key: 'J5FBZ-XCUKI-UFEG2-5KOJJ-XD4L3-KNFNG'
});
that.authorizationLocation();
// #endif
// this.getBannerList();
// this.getnavlistClassify();
// this.getClassify();
//饿
// this.$Request.getT('/common/type/138').then(res => {
// if (res.code == 0) {
// if (res.data && res.data.value) {
// this.mtelmCheck = res.data.value;
// }
// }
// });
// this.$Request.getT('/banner/selectBannerList?classify=4&state=1').then(res => {
// if (res.code === 0) {
// this.meituanList = res.data[0];
// }
// });
// this.$Request.getT('/banner/selectBannerList?classify=4&state=2').then(res => {
// if (res.code === 0) {
// this.elemeList = res.data[0];
// }
// });
// 202
// 204
// 205
// 209
// 207
// 208
// 206
// 203
// that.$Request.getT('/common/type/209').then(res => { //
// if (res.code == 0) {
// if (res.data && res.data.value) {
// that.arr.push(res.data.value)
// }
// }
// })
// that.$Request.getT('/common/type/208').then(res => { //
// if (res.code == 0) {
// if (res.data && res.data.value) {
// that.arr.push(res.data.value)
// }
// }
// })
// that.$Request.getT('/common/type/206').then(res => { //
// if (res.code == 0) {
// if (res.data && res.data.value) {
// that.arr.push(res.data.value)
// }
// }
// })
},
onShow() {
let that = this;
var city = this.$queue.getData('city');
var localCampus = this.$queue.getData('localCampus');
if (city && localCampus) {
console.log(city)
this.latitude = this.$queue.getData('latitude');
this.longitude = this.$queue.getData('longitude');
this.city = city;
this.localCampus = localCampus;
this.$queue.remove('localCampus');
this.page = 1;
this.getHaoDianTuiJian1();
this.getHaoDianTuiJian();
}
let userId = this.$queue.getData('userId');
if (userId) {
//
if (!uni.getStorageSync('sendindexMsg')) {
// this.openMsg()
}
} }
}, },
methods: { methods: {
change(index) { change(index) {
this.current = index; this.current = index;
}, },
//
goSelectCity() { goSelectCity() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/index/citys' url: '/pages/index/citys'
}) })
}, },
//
totasks() { totasks() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/index/tasksdetails', url: '/pages/index/tasksdetails',
}) })
},
openMsg() {
var that = this
wx.getSetting({
withSubscriptions: true, //false
success(ret) {
// console.log(ret,'------------------')
// console.log(Object.keys(ret.subscriptionsSetting.itemSettings).length)
// if (JSON.stringify(ret.subscriptionsSetting.itemSettings).indexOf('accept')!=-1) {
if (ret.subscriptionsSetting.itemSettings) {
uni.setStorageSync('sendindexMsg', true)
uni.openSetting({ //
success(rea) {
console.log(rea.authSetting)
}
});
} else { //
uni.setStorageSync('sendindexMsg', false)
uni.showModal({
title: '提示',
content: '为了更好的体验,请绑定消息推送',
confirmText: '确定',
cancelText: '取消',
success: function(res) {
if (res.confirm) {
uni.requestSubscribeMessage({
tmplIds: that.arr,
success(re) {
// console.log(re,'**********')
var datas = JSON.stringify(re);
if (datas.indexOf("accept") != -1) {
console.log(re)
}
},
fail: (res) => {
console.log(res)
}
})
that.showModal = false
} else if (res.cancel) {
that.showModal = true
}
}
})
}
}
})
},
//
gochegnxu(classify) {
let token = this.$queue.getData('token');
let userId = this.$queue.getData('userId');
if (token) {
if (uni.getStorageSync('sendindexMsg')) {
uni.requestSubscribeMessage({
tmplIds: this.arr,
success(re) {
// console.log(re,'**********')
var datas = JSON.stringify(re);
if (datas.indexOf("accept") != -1) {
console.log(re)
}
},
fail: (res) => {
console.log(res)
}
})
}
if (classify == 1) { //
// #ifdef MP-WEIXIN
uni.navigateToMiniProgram({
appId: 'wxde8ac0a21135c07d',
path: this.meituanList.url,
fail(res) {
console.error(res)
}
})
// #endif
} else if (classify == 2) { //饿
// #ifdef MP-WEIXIN
uni.navigateToMiniProgram({
appId: 'wxece3a9a4c82f58c9',
path: this.elemeList.url,
fail(res) {
console.error(res)
}
})
// #endif
}
} else {
this.goLogin();
}
},
tuijianClickItem(index) {
let token = this.$queue.getData('token');
let userId = this.$queue.getData('userId');
if (token) {
if (uni.getStorageSync('sendindexMsg')) {
uni.requestSubscribeMessage({
tmplIds: this.arr,
success(re) {
// console.log(re,'**********')
var datas = JSON.stringify(re);
if (datas.indexOf("accept") != -1) {
console.log(re)
}
},
fail: (res) => {
console.log(res)
}
})
}
uni.navigateTo({
url: '/pages/index/tuijianList'
});
} else {
this.goLogin();
}
},
ed(res) {
console.log(res)
},
dateChange(d) {
console.log(d)
},
getHaoDianTuiJian() {
this.loadingType = 1;
uni.showLoading({
title: '加载中...',
});
let data = {
page: 1,
limit: 4,
longitude: this.longitude,
latitude: this.latitude,
city: this.city,
search: '',
isGoods: '1'
}
this.$Request.getT('/wm/selectHomeGoodsList', data).then(res => {
if (res.code === 0) {
this.tuijianList = [];
res.data.list.forEach(d => {
d.distance = this.setMorKm(d.distance);
this.tuijianList.push(d)
});
}
uni.hideLoading();
})
},
getHaoDianTuiJian1() {
this.loadingType = 1;
uni.showLoading({
title: '加载中...',
});
let data = {
page: this.page,
limit: this.limit,
longitude: this.longitude,
latitude: this.latitude,
city: this.city,
search: '',
sort: this.sortType,
typeId: this.typeId
}
this.$Request.getT('/wm/selectHomeGoodsList', data).then(res => {
if (res.code === 0) {
if (this.page === 1) {
this.goodsHomeList = [];
}
res.data.list.forEach(d => {
d.distance = this.setMorKm(d.distance);
this.goodsHomeList.push(d)
});
if (res.data.list.length === this.limit) {
this.loadingType = 0;
} else {
this.loadingType = 3;
}
} else {
this.loadingType = 2;
}
uni.hideLoading();
})
},
setMorKm(m) {
var n = ''
if (m) {
if (m >= 1000) {
n = (m / 1000).toFixed(0) + 'km'
} else {
n = parseInt(m) + 'm'
}
} else {
n = '0m'
}
return n
},
getClassify() {
this.$Request.getT('/helpClassify/selectClassifyList').then(res => {
if (res.code === 0) {
this.navlist = res.data;
}
});
},
getnavlistClassify() {
this.$Request.getT('/banner/selectBannerList?state=-1&classify=2').then(res => {
if (res.code === 0) {
let dataList = [];
let data = {
text: '全部品类',
value: 0
}
dataList.push(data);
res.data.forEach(d => {
let data = {
text: '',
value: ''
}
data.text = d.name;
data.value = d.id;
if (d.state == 1) {
dataList.push(data);
}
});
this.filterData.push(dataList);
}
});
},
initLocation(latitude, longitude) {
var that = this;
qqmapsdk.reverseGeocoder({
location: latitude + ',' + longitude || '',
success: function(res) { //
if (res.status == 0) {
console.log(res)
that.authorize = false;
var res = res.result;
that.latitude = latitude;
that.longitude = longitude;
that.$queue.setData('latitude', latitude)
that.$queue.setData('longitude', longitude)
let s = res.ad_info.city.substring(0, res.ad_info.city.length - 1);
that.city = s;
that.$queue.setData('city', that.city);
that.localCampus = res.address_reference.landmark_l2.title;
that.getHaoDianTuiJian1();
that.getHaoDianTuiJian();
}
},
fail: function(error) {
console.error(error);
},
complete: function(res) {
console.log(res);
}
})
},
startSetting() {
let that = this;
// #ifdef APP-PLUS
permision.gotoAppSetting();
// #endif
// #ifdef MP-WEIXIN
uni.openSetting({
success(res3) {
console.log(res3)
if (res3.authSetting[
'scope.userLocation'
]) {
uni.hideToast();
that.initMyPosition();
} else {
that.authorizationLocation();
}
// -()
}
});
// #endif
},
initMyPosition() {
let that = this;
uni.getLocation({
type: 'gcj02',
altitude: true,
success: res => {
that.initLocation(res.latitude, res.longitude);
}
});
},
authorizationLocation: function() {
let that = this;
uni.getSetting({
success(res1) {
if (!res1.authSetting['scope.userLocation']) {
//
uni.authorize({
scope: 'scope.userLocation',
success() { //1.1
that.initMyPosition();
},
fail() { //1.2
that.authorize = true; // true: false:
}
})
} else {
// -()
that.initMyPosition();
}
}
});
},
getBannerList() {
this.$Request.getT('/banner/selectBannerList?state=-1&classify=1').then(res => {
if (res.code === 0) {
this.banners = [];
res.data.forEach(d => {
if (d.state == 1) {
this.banners.push(d);
}
});
}
});
},
//
toGoodsInfo: function(url) {
if (uni.getStorageSync('sendindexMsg')) {
uni.requestSubscribeMessage({
tmplIds: this.arr,
success(re) {
// console.log(re,'**********')
var datas = JSON.stringify(re);
if (datas.indexOf("accept") != -1) {
console.log(re)
}
},
fail: (res) => {
console.log(res)
}
})
}
let token = this.$queue.getData('token');
let userId = this.$queue.getData('userId');
if (url.indexOf('/pages/') !== -1) {
uni.navigateTo({
url
});
} else {
//#ifndef H5
uni.navigateTo({
url: '/pages/public/webview?url=' + url
});
//#endif
//#ifdef H5
window.location.href = url;
//#endif
}
},
goSearch() {
if (uni.getStorageSync('sendindexMsg')) {
uni.requestSubscribeMessage({
tmplIds: this.arr,
success(re) {
// console.log(re,'**********')
var datas = JSON.stringify(re);
if (datas.indexOf("accept") != -1) {
console.log(re)
}
},
fail: (res) => {
console.log(res)
}
})
}
uni.navigateTo({
url: '/pages/task/search'
});
},
goSelectCity() {
if (uni.getStorageSync('sendindexMsg')) {
uni.requestSubscribeMessage({
tmplIds: this.arr,
success(re) {
// console.log(re,'**********')
var datas = JSON.stringify(re);
if (datas.indexOf("accept") != -1) {
console.log(re)
}
},
fail: (res) => {
console.log(res)
}
})
}
if (!this.authorize) {
uni.navigateTo({
url: '/pages/index/selectCampus?city=' + this.city
});
} else {
this.startSetting();
}
},
goLogin() {
this.$queue.setData('href', '/pages/index/index');
uni.navigateTo({
url: '/pages/public/login'
});
},
navClick: function(res) {
if (uni.getStorageSync('sendindexMsg')) {
uni.requestSubscribeMessage({
tmplIds: this.arr,
success(re) {
// console.log(re,'**********')
var datas = JSON.stringify(re);
if (datas.indexOf("accept") != -1) {
console.log(re)
}
},
fail: (res) => {
console.log(res)
}
})
}
console.log('点击', res)
this.page = 1;
if (res.index1 == 0) {
this.sortType = res.index ? res.index : 0;
this.getHaoDianTuiJian1();
} else if (res.index1 == 1) {
this.typeId = res.index ? res.index : 0;
this.getHaoDianTuiJian1();
}
},
clickItem: function(options) {
let token = this.$queue.getData('token');
let userId = this.$queue.getData('userId');
if (token) {
if (uni.getStorageSync('sendindexMsg')) {
uni.requestSubscribeMessage({
tmplIds: this.arr,
success(re) {
// console.log(re,'**********')
var datas = JSON.stringify(re);
if (datas.indexOf("accept") != -1) {
console.log(re)
}
},
fail: (res) => {
console.log(res)
}
})
}
uni.navigateTo({
url: '/pages/index/taskDetail?goodsId=' + options.item.goodsId + '&latitude=' + this
.latitude + '&longitude=' + this.longitude
})
} else {
this.goLogin();
}
},
toNavList: function(item) {
let token = this.$queue.getData('token');
let userId = this.$queue.getData('userId');
if (token) {
if (uni.getStorageSync('sendindexMsg')) {
uni.requestSubscribeMessage({
tmplIds: this.arr,
success(re) {
// console.log(re,'**********')
var datas = JSON.stringify(re);
if (datas.indexOf("accept") != -1) {
console.log(re)
}
},
fail: (res) => {
console.log(res)
}
})
}
uni.navigateTo({
url: '/pages/task/tasklist?searchValue=&classifyId=' + item.id + '&name=' + item
.classifyName
});
} else {
this.goLogin();
}
},
//
chunk: function(array, size) {
const length = array.length
if (!length || !size || size < 1) {
return []
}
let index = 0
let resIndex = 0
let result = new Array(Math.ceil(length / size))
while (index < length) {
result[resIndex++] = array.slice(index, (index += size))
}
return result
},
topScrollTap: function() {
uni.pageScrollTo({
scrollTop: 0,
duration: 300
});
}
},
onPageScroll: function(e) {
this.scrollTop = e.scrollTop > 200;
},
onReachBottom: function() {
this.page = this.page + 1;
this.getHaoDianTuiJian1();
} }
}
} }
@ -213,6 +877,8 @@
.banner { .banner {
margin: 0 16px; margin: 0 16px;
} }
.nav p { .nav p {
font-size: 14px; font-size: 14px;
@ -227,7 +893,7 @@
} }
.nav .citys { .nav .citys {
width: 69px; width:40px;
font-size: 14px; font-size: 14px;
font-weight: 500; font-weight: 500;
font-family: PingFang SC; font-family: PingFang SC;

9
pages/index/taskDetail.vue

@ -10,8 +10,8 @@
<!-- <swiper-item class="swiper-wrap" v-for="(item,index) in banners" :key='index'> --> <!-- <swiper-item class="swiper-wrap" v-for="(item,index) in banners" :key='index'> -->
<!-- <image :src="item"></image> --> <!-- <image :src="item"></image> -->
<!-- </swiper-item> --> <!-- </swiper-item> -->
<swiper-item class="swiper-wrap" v-for="(item,index) in 4" :key='index'> <swiper-item class="swiper-wrap" v-for="(item,index) in banners" :key='index'>
<image src="../../static/img/home/xiangqing.png"></image> <image :src="item"></image>
</swiper-item> </swiper-item>
</swiper> </swiper>
</view> </view>
@ -237,6 +237,7 @@ font-family: PingFang SC;font-weight: 600;line-height:22px; #000000;margin-botto
}, },
onLoad(e) { onLoad(e) {
this.goodsId = e.goodsId; this.goodsId = e.goodsId;
console.log(this.goodsId,'goodsid')
this.latitude = e.latitude; this.latitude = e.latitude;
this.longitude = e.longitude; this.longitude = e.longitude;
let token = this.$queue.getData('token'); let token = this.$queue.getData('token');
@ -244,6 +245,7 @@ font-family: PingFang SC;font-weight: 600;line-height:22px; #000000;margin-botto
// if (!token) { // if (!token) {
// this.goLogin(); // this.goLogin();
// } // }
this.initHelpOrder()
// 202 // 202
// 204 // 204
@ -286,6 +288,7 @@ font-family: PingFang SC;font-weight: 600;line-height:22px; #000000;margin-botto
// } // }
}, },
methods: { methods: {
// //
openMsg() { openMsg() {
var that = this var that = this
@ -492,7 +495,7 @@ font-family: PingFang SC;font-weight: 600;line-height:22px; #000000;margin-botto
this.$queue.showLoading('加载中...'); this.$queue.showLoading('加载中...');
let that = this; let that = this;
let userId = this.$queue.getData('userId') ? this.$queue.getData('userId') : 0; let userId = this.$queue.getData('userId') ? this.$queue.getData('userId') : 0;
this.$Request.getT('/wm/selectGoodsDetails?goodsId=' + goodsId + '&userId=' + userId + '&latitude=' + this this.$Request.getT('/wm/selectGoodsDetails?goodsId=' + this.goodsId + '&userId=' + userId + '&latitude=' + this
.latitude + '&longitude=' + this.longitude).then(res => { .latitude + '&longitude=' + this.longitude).then(res => {
if (res.code == 0) { if (res.code == 0) {
let image = res.goods.img.split(","); let image = res.goods.img.split(",");

2
pages/my/index.vue

@ -339,7 +339,7 @@
// //
if (this.showModal) { if (this.showModal) {
this.openMsg() // this.openMsg()
} }
} }
}, },

Loading…
Cancel
Save