作者 倪静楠

8/26

... ... @@ -128,7 +128,7 @@
.goodsBtn {
width: 180rpx;
height: 68rpx;
background: linear-gradient(135deg, #ff814a, #ff9d66);
background:#ff814a;
border-radius: 48rpx;
font-size: 28rpx;
color: #fff;
... ... @@ -137,6 +137,7 @@
align-items: center;
margin-right: 32rpx;
}
.goodsBtn1 {
background: #d5d5d5;
}
... ... @@ -185,3 +186,4 @@
color: #cdcecf;
font-size: 24rpx;
}
... ...
... ... @@ -127,7 +127,7 @@
})
},
publish() {
if (this.wechat == null) {
if (this.wechat == 'null ') {
uni.showToast({
title: '请先设置微信号',
icon: 'none'
... ...
... ... @@ -135,12 +135,12 @@
},
//分享
onShareAppMessage: function(e) {
let title = '近邻交易,闲置不再闲置'
let imgUrls='../../static/image/shareImg.png'
let title = '快来社区淘转闲置兑奖吧!'
// let imgUrls='../../static/image/shareImg.png'
return {
title: title,
path: "/pages/activity/pintu-detail?id=" + this.id+'&lat='+this.lat+'&lot='+this.lot+'&userId='+uni.getStorageSync('userInfo').id,
imageUrl:imgUrls
imageUrl:''
}
},
onShareTimeline() {
... ...
... ... @@ -64,6 +64,7 @@
import request from "../../utils/request.js"
export default {
onLoad(options) {
console.log(options,'optionsss')
this.id = options.id
this.index = options.index
... ... @@ -129,7 +130,7 @@
},
//发送
send() {
if (this.wechat == null) {
if (this.wechat == 'null ') {
uni.showToast({
title: '请先设置微信号',
icon: 'none'
... ... @@ -170,19 +171,19 @@
}
},
created() {
request.get('/api/push/erLei', {
lat2: uni.getStorageSync('lat'),
lng2: uni.getStorageSync('lot'),
sort2_id: 2,
p: priceType,
q: jvType
}).then(res => {
this.goodsList = res.data.info
}).catch(err => {
// created() {
// request.get('/api/push/erLei', {
// lat2: uni.getStorageSync('lat'),
// lng2: uni.getStorageSync('lot'),
// sort2_id: 2,
// p: priceType,
// q: jvType
// }).then(res => {
// this.goodsList = res.data.info
// }).catch(err => {
})
}
// })
// }
}
</script>
... ...
... ... @@ -190,7 +190,11 @@
//个人资料
getUserInfo() {
request.get('/api/personal/chaKan', {}).then(res => {
this.wechat = res.data.info[0].wechat_id
console.log(res)
this.wechat = res.data.info[0].wechat_id?res.data.info[0].wechat_id:'';
console.log(this.wechat,'。。。。’')
console.log(typeof(this.wechat))
console.log(!this.wechat && typeof(this.wechat)!='undefined' && this.wechat!=0)
}).catch(err => {
})
... ... @@ -203,7 +207,9 @@
},
//交换微信号
allpyWechat() {
if (this.wechat == '') {
console.log(this.wechat,'微信号微信号')
console.log(this.wechat+'1')
if (this.wechat == 'null ') {
uni.showToast({
title: '请设置微信号',
icon: 'none'
... ...
... ... @@ -479,7 +479,6 @@
content: '确定保存到相册吗',
success: function(res) {
if (res.confirm) {
uni.downloadFile({
url: _self.haibaoPic,
success: (res) => {
... ... @@ -503,8 +502,6 @@
}
}
})
} else if (res.cancel) {
}
... ... @@ -713,24 +710,25 @@
} else if (res.cancel) {
if (that.id) {
uni.navigateTo({
url: "/pages/index/all-message?id=" + that.id+'&index=0'
url: "/pages/index/all-message?id=" + that.id + '&index=0'
})
} else {
uni.navigateTo({
url: "/pages/index/all-message?id=" + that.goods_id+'&index=1'
url: "/pages/index/all-message?id=" + that.goods_id +
'&index=1'
})
}
}
}
})
} else {
if (that.id) {
if (that.id == undefined || that.id == 'undefined') {
uni.navigateTo({
url: "/pages/index/all-message?id=" + that.id+'&index=0'
url: "/pages/index/all-message?id=" + that.goods_id + '&index=1'
})
} else {
uni.navigateTo({
url: "/pages/index/all-message?id=" + that.goods_id+'&index=1'
url: "/pages/index/all-message?id=" + that.id + '&index=0'
})
}
}
... ... @@ -740,13 +738,21 @@
},
messageClick() {
if (this.token) {
let goodsId = null
if (this.id == undefined || this.id == 'undefined') {
goodsId = this.goods_id
console.log(goodsId,'idddddddd11111111')
} else {
goodsId = this.id
console.log(goodsId,'idddddddd22222222')
}
console.log(goodsId,'idddddddd')
uni.navigateTo({
url: "/pages/index/all-message?id=" + this.goods_id
url: "/pages/index/all-message?id=" + goodsId
})
} else {
this.login()
}
},
messageLists() {
console.log(this.id, this.goods_id, 'idddd')
... ... @@ -755,7 +761,7 @@
request.get('/api/msg/allMsg', {
// goods_id: this.id== || this.goods_id
goods_id: this.id == undefined || this.id == 'undefined' ? this.goods_id : this.id,
is_good:this.id == undefined || this.id == 'undefined' ?1 :0,
is_good: this.id == undefined || this.id == 'undefined' ? 1 : 0,
}).then(res => {
console.log(res.data.info, 'ressss')
this.messageList = res.data.info
... ...
<template>
<view class="container">
<!-- 操作演示start -->
<view class="demoBox" v-if="demo">
<view class="demoBox" v-if="false">
<view class="">
<image src="http://muying.qiniu.broing.cn/uploads/20210621/a374e24f9e49e985dd0d6bdb09ee77c8.png" mode=""
class="img" mode="widthFix" v-if="imgIndex==1"></image>
... ... @@ -32,7 +32,7 @@
</view>
</view>
<!-- 操作演示end -->
<view class="" v-if="!demo">
<view class="">
<image :src="IndexImg" style="width: 100%;display: none;" mode=""></image>
<view class=""
style="position: fixed;top: 0;left: 0;height:176rpx;width: 100%;z-index: 99999;overflow: hidden;background-color: #fff;">
... ... @@ -1128,10 +1128,6 @@
.demoBox {
width: 100%;
height: 100%;
/* overflow: hidden; */
/* display: flex;
align-items: flex-end;
margin-bottom: -40rpx; */
}
.img {
... ...
... ... @@ -36,7 +36,10 @@
<image src="/static/image/Frame_9@2x.png" mode=""></image>
<text class="goodsJFs">{{item.num}}积分</text>
</view>
<view class="goodsBtn" @click="apply(item.id)">
<view class="goodsBtn" @click="apply(item.id)" v-if="item.number>0">
立即兑换
</view>
<view class="goodsBtn goodsBtn1" @click="noApply" v-else >
立即兑换
</view>
</view>
... ... @@ -112,7 +115,12 @@
url: "/pages/activity/exchange-detail?id="+id
});
},
noApply(){
uni.showToast({
title:'暂无库存',
icon:'none'
})
},
//跳转发布需求
OnMaiProject() {
uni.navigateTo({
... ... @@ -244,4 +252,7 @@
left: 30rpx;
top: 22px;
}
.nogoodsBtn{
background-color: #d9d9d9 !important;
}
</style>
... ...
... ... @@ -109,7 +109,7 @@
})
},
send() {
if (this.wechat == null) {
if (this.wechat == 'null ') {
uni.showToast({
title: '请先设置微信号',
icon: 'none'
... ...
... ... @@ -359,7 +359,7 @@
title: '请选择新旧程度',
icon: 'none'
})
} else if (this.wechat == null) {
} else if (this.wechat == 'null ') {
uni.showToast({
title: '请先设置微信号',
icon: 'none'
... ...