接口调取完成
|
@ -2,13 +2,13 @@
|
||||||
<view class="goods-list flex">
|
<view class="goods-list flex">
|
||||||
<view class="item background-white radius20 mar-s20" @tap.top="goDetail(item.id)" v-for="(item,index) in goodsList" :key="index">
|
<view class="item background-white radius20 mar-s20" @tap.top="goDetail(item.id)" v-for="(item,index) in goodsList" :key="index">
|
||||||
<view class="cover radius20">
|
<view class="cover radius20">
|
||||||
<image :src="item.cover" mode="widthFix"></image>
|
<image class="img" :src="item.cover" mode="widthFix"></image>
|
||||||
<view v-if="isOperate" class="hide-btn font24 color-ff radius20 flex" :class="item.state==0?'background-8c':'background-blue'" @tap.stop="changeStateEv(item.id,index)">{{item.state==0?'已隐藏':'已展示'}}</view>
|
<view v-if="isOperate" class="hide-btn font24 color-ff radius20 flex" :class="item.status==1?'background-8c':'background-blue'" @tap.stop="changeStateEv(item.id,index)">{{item.status==1?'已隐藏':'已展示'}}</view>
|
||||||
</view>
|
</view>
|
||||||
<text class="name font28 clips1">{{item.name}}</text>
|
<text class="name font28 clips1">{{item.name}}</text>
|
||||||
<view class="price flex">
|
<view class="price flex">
|
||||||
<text class="color-8c font24">¥{{item.original_price}}</text>
|
<text class="text color-8c font24" v-if="item.original_price!==''">¥{{item.original_price}}</text>
|
||||||
<text class="color-red font28">¥{{item.price}}</text>
|
<text class="text color-red font28">¥{{item.price}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -78,7 +78,7 @@
|
||||||
margin-bottom: 10rpx;
|
margin-bottom: 10rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
.goods-list .cover image{
|
.goods-list .cover .img{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
}
|
}
|
||||||
|
@ -97,7 +97,7 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-top: 5rpx;
|
margin-top: 5rpx;
|
||||||
}
|
}
|
||||||
.goods-list .price>text:first-child{
|
.goods-list .price>.text:first-child{
|
||||||
margin-right: 6rpx;
|
margin-right: 6rpx;
|
||||||
text-decoration: line-through;
|
text-decoration: line-through;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
<view class="tabbar-list border-box pad-sx40 background-white pad-zy20 flex">
|
<view class="tabbar-list border-box pad-sx40 background-white pad-zy20 flex">
|
||||||
<!-- 底部导航 -->
|
<!-- 底部导航 -->
|
||||||
<view class="tabbar-item color-88 flex" :class="current==index ? 'active' : ''" @tap="chooseFootTab(index)" v-for="(item,index) in footBarList" :key="index">
|
<view class="tabbar-item color-88 flex" :class="current==index ? 'active' : ''" @tap="chooseFootTab(index)" v-for="(item,index) in footBarList" :key="index">
|
||||||
<view class="icon flex"><image :style="{width:[41,38][index]+'rpx',height:[41,40][index]+'rpx'}" :src="item.iconPath" mode="widthFix"></image></view>
|
<view class="icon flex"><image class="img" :style="{width:[41,38][index]+'rpx',height:[41,40][index]+'rpx'}" :src="item.iconPath" mode="widthFix"></image></view>
|
||||||
<view class="title font26">{{item.title}}</view>
|
<view class="title font26">{{item.title}}</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 发布按钮 -->
|
<!-- 发布按钮 -->
|
||||||
<view class="release-btn background-blue color-ff radius100 flex" @tap="goRelease">
|
<view class="release-btn background-blue color-ff radius100 flex" @tap="goRelease">
|
||||||
<image src="/static/icon-release.png" mode="widthFix"></image>
|
<image class="img" src="/static/icon-release.png" mode="widthFix"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
@ -88,7 +88,7 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 40rpx;
|
height: 40rpx;
|
||||||
}
|
}
|
||||||
.tabbar-item .icon>image{
|
.tabbar-item .icon .img{
|
||||||
filter: grayscale(100%);
|
filter: grayscale(100%);
|
||||||
}
|
}
|
||||||
.tabbar-item .title{
|
.tabbar-item .title{
|
||||||
|
@ -99,7 +99,7 @@
|
||||||
.tabbar-item.active{
|
.tabbar-item.active{
|
||||||
color: #1981ff;
|
color: #1981ff;
|
||||||
}
|
}
|
||||||
.tabbar-item.active .icon>image{
|
.tabbar-item.active .icon .img{
|
||||||
filter: grayscale(0);
|
filter: grayscale(0);
|
||||||
}
|
}
|
||||||
/* 发布按钮 */
|
/* 发布按钮 */
|
||||||
|
@ -116,7 +116,7 @@
|
||||||
bottom: 120rpx;
|
bottom: 120rpx;
|
||||||
z-index: 99;
|
z-index: 99;
|
||||||
}
|
}
|
||||||
.release-btn>image{
|
.release-btn .img{
|
||||||
width: 48rpx;
|
width: 48rpx;
|
||||||
height: 48rpx;
|
height: 48rpx;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name" : "小区闲置",
|
"name" : "小区闲置",
|
||||||
"appid" : "__UNI__768F35C",
|
"appid" : "__UNI__768F35C",
|
||||||
"description" : "这是一款基于uniapp开发的app和微信小程序的模板框架",
|
"description" : "发布或购买小区闲置商品小程序",
|
||||||
"versionName" : "1.0.0",
|
"versionName" : "1.0.0",
|
||||||
"versionCode" : "100",
|
"versionCode" : "100",
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
size:10, //条数
|
size:10, //条数
|
||||||
total:0, //总数
|
total:0, //总数
|
||||||
isLoading:false, //是否加载完成
|
isLoading:false, //是否加载完成
|
||||||
estate:0, //0:闲置进入,1:车位进入,2:房屋进入
|
estate:1, //1:闲置进入,2:车位进入,3:房屋进入
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(op) {
|
onLoad(op) {
|
||||||
|
|
|
@ -54,6 +54,7 @@
|
||||||
showPhone:false, //显示电话号码
|
showPhone:false, //显示电话号码
|
||||||
isLoading:false, //是否加载完成
|
isLoading:false, //是否加载完成
|
||||||
type:'', //是否自己发布
|
type:'', //是否自己发布
|
||||||
|
goods_id: 0,// 商品id
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(op) {
|
onLoad(op) {
|
||||||
|
@ -61,28 +62,28 @@
|
||||||
this.type = op.type;
|
this.type = op.type;
|
||||||
}
|
}
|
||||||
if(op.id){
|
if(op.id){
|
||||||
// 查询商品列表
|
// 获取商品id
|
||||||
this.getGoodsDetail(op.id);
|
this.goods_id = op.id;
|
||||||
}else{
|
|
||||||
this.$toolAll.tools.showToast('参数不合法');
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
// 查询商品详情
|
||||||
|
this.getGoodsDetail(this.goods_id);
|
||||||
},
|
},
|
||||||
onShareAppMessage(res) {
|
onShareAppMessage(res) {
|
||||||
let shareObj = {
|
let shareObj = {
|
||||||
title:'老农极鲜',
|
title:this.goodsDetail.name,
|
||||||
path: uni.getStorageSync('page-path-options')+'?invite_code='+uni.getStorageSync('invite_code'),
|
path: this.type=='release'?uni.getStorageSync('page-path-options').substring(0,uni.getStorageSync('page-path-options').indexOf("&")):uni.getStorageSync('page-path-options'),
|
||||||
imageUrl:'/static/img/shear-index.jpg',
|
imageUrl:this.goodsDetail.cover,
|
||||||
}
|
}
|
||||||
// 返回shareObj
|
// 返回shareObj
|
||||||
return shareObj;
|
return shareObj;
|
||||||
},
|
},
|
||||||
onShareTimeline(res){
|
onShareTimeline(res){
|
||||||
let shareObj = {
|
let shareObj = {
|
||||||
title:'老农极鲜',
|
title:this.goodsDetail.name,
|
||||||
query: '?invite_code='+uni.getStorageSync('invite_code'),
|
path: this.type=='release'?uni.getStorageSync('page-path-options').substring(0,uni.getStorageSync('page-path-options').indexOf("&")):uni.getStorageSync('page-path-options'),
|
||||||
path: uni.getStorageSync('page-path-options')+'?invite_code='+uni.getStorageSync('invite_code'),
|
imageUrl:this.goodsDetail.cover,
|
||||||
imageUrl:'/static/img/shear-index.jpg',
|
|
||||||
}
|
}
|
||||||
// 返回shareObj
|
// 返回shareObj
|
||||||
return shareObj;
|
return shareObj;
|
||||||
|
@ -118,7 +119,7 @@
|
||||||
// 编辑
|
// 编辑
|
||||||
editEv(id){
|
editEv(id){
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:`/pages/release/release?id=${id}`,
|
url:`/pages/idle/release?id=${id}`,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -127,9 +128,11 @@
|
||||||
this.$requst.post('/api/v1/goods/del',{id:id}).then(res=>{
|
this.$requst.post('/api/v1/goods/del',{id:id}).then(res=>{
|
||||||
if(res.code == 0){
|
if(res.code == 0){
|
||||||
this.$toolAll.tools.showToast('删除成功');
|
this.$toolAll.tools.showToast('删除成功');
|
||||||
|
setTimeout(()=>{
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:`/pages/goods/goods`,
|
url:`/pages/goods/goods`,
|
||||||
})
|
})
|
||||||
|
},500)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
@ -22,31 +22,13 @@
|
||||||
size:10, //条数
|
size:10, //条数
|
||||||
total:0, //总数
|
total:0, //总数
|
||||||
isLoading:false, //是否加载完成
|
isLoading:false, //是否加载完成
|
||||||
|
flag:true, //改变状态
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
// 查询商品列表
|
// 查询商品列表
|
||||||
this.getGoodsList();
|
this.getGoodsList();
|
||||||
},
|
},
|
||||||
onShareAppMessage(res) {
|
|
||||||
let shareObj = {
|
|
||||||
title:'老农极鲜',
|
|
||||||
path: uni.getStorageSync('page-path-options')+'?invite_code='+uni.getStorageSync('invite_code'),
|
|
||||||
imageUrl:'/static/img/shear-index.jpg',
|
|
||||||
}
|
|
||||||
// 返回shareObj
|
|
||||||
return shareObj;
|
|
||||||
},
|
|
||||||
onShareTimeline(res){
|
|
||||||
let shareObj = {
|
|
||||||
title:'老农极鲜',
|
|
||||||
query: '?invite_code='+uni.getStorageSync('invite_code'),
|
|
||||||
path: uni.getStorageSync('page-path-options')+'?invite_code='+uni.getStorageSync('invite_code'),
|
|
||||||
imageUrl:'/static/img/shear-index.jpg',
|
|
||||||
}
|
|
||||||
// 返回shareObj
|
|
||||||
return shareObj;
|
|
||||||
},
|
|
||||||
onReachBottom(e) {
|
onReachBottom(e) {
|
||||||
if(this.goodsList.length<this.total){
|
if(this.goodsList.length<this.total){
|
||||||
this.page++;
|
this.page++;
|
||||||
|
@ -76,7 +58,8 @@
|
||||||
cover:item.cover,
|
cover:item.cover,
|
||||||
name:item.title,
|
name:item.title,
|
||||||
original_price:item.original_price,
|
original_price:item.original_price,
|
||||||
price:item.price
|
price:item.price,
|
||||||
|
status:item.status
|
||||||
}
|
}
|
||||||
goodsArr.push(obj)
|
goodsArr.push(obj)
|
||||||
})
|
})
|
||||||
|
@ -89,12 +72,23 @@
|
||||||
|
|
||||||
// 更改显示状态
|
// 更改显示状态
|
||||||
changeStateEv(id,index){
|
changeStateEv(id,index){
|
||||||
if(this.goodsList[index].state==0){
|
if(this.flag){
|
||||||
this.goodsList[index].state = 1;
|
this.flag =false;
|
||||||
this.$toolAll.tools.showToast('状态变更成功');
|
this.$requst.post('/api/v1/goods/set-status',{id:id,status:this.goodsList[index].status==0?1:0}).then(res=>{
|
||||||
|
if(res.code == 0){
|
||||||
|
console.log(res,'改变状态');
|
||||||
|
if(this.goodsList[index].status==0){
|
||||||
|
this.goodsList[index].status = 1;
|
||||||
|
this.$toolAll.tools.showToast('已隐藏');
|
||||||
}else{
|
}else{
|
||||||
this.goodsList[index].state = 0;
|
this.goodsList[index].status = 0;
|
||||||
this.$toolAll.tools.showToast('状态变更成功');
|
this.$toolAll.tools.showToast('已展示');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
setTimeout(()=>{
|
||||||
|
this.flag = true;
|
||||||
|
},500)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -39,25 +39,25 @@
|
||||||
// 查询商品列表
|
// 查询商品列表
|
||||||
this.getGoodsList();
|
this.getGoodsList();
|
||||||
}else{
|
}else{
|
||||||
// 查询小区列表
|
uni.navigateTo({
|
||||||
this.getEstateList();
|
url:'/pages/estate/estate?estate=1'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShareAppMessage(res) {
|
onShareAppMessage(res) {
|
||||||
let shareObj = {
|
let shareObj = {
|
||||||
title:'老农极鲜',
|
title:'小区闲置',
|
||||||
path: uni.getStorageSync('page-path-options')+'?invite_code='+uni.getStorageSync('invite_code'),
|
path: uni.getStorageSync('page-path-options'),
|
||||||
imageUrl:'/static/img/shear-index.jpg',
|
imageUrl:'/static/share-logo.png',
|
||||||
}
|
}
|
||||||
// 返回shareObj
|
// 返回shareObj
|
||||||
return shareObj;
|
return shareObj;
|
||||||
},
|
},
|
||||||
onShareTimeline(res){
|
onShareTimeline(res){
|
||||||
let shareObj = {
|
let shareObj = {
|
||||||
title:'老农极鲜',
|
title:'小区闲置',
|
||||||
query: '?invite_code='+uni.getStorageSync('invite_code'),
|
path: uni.getStorageSync('page-path-options'),
|
||||||
path: uni.getStorageSync('page-path-options')+'?invite_code='+uni.getStorageSync('invite_code'),
|
imageUrl:'/static/share-logo.png',
|
||||||
imageUrl:'/static/img/shear-index.jpg',
|
|
||||||
}
|
}
|
||||||
// 返回shareObj
|
// 返回shareObj
|
||||||
return shareObj;
|
return shareObj;
|
||||||
|
@ -70,18 +70,6 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 查询小区列表
|
|
||||||
getEstateList(){
|
|
||||||
this.$requst.get('/api/v1/goods/area').then(res=>{
|
|
||||||
if(res.code == 0){
|
|
||||||
this.area_id = res.data.list[0].id;
|
|
||||||
this.pageTitle = res.data.list[0].title+'-闲置商品';
|
|
||||||
// 查询商品列表
|
|
||||||
this.getGoodsList();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
// 查询商品列表
|
// 查询商品列表
|
||||||
getGoodsList(){
|
getGoodsList(){
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
|
|
|
@ -6,6 +6,15 @@
|
||||||
<view class="notice-tips color-orange font26 border-box pad-all20 flex"><image src="/static/icon-notice.png" mode="widthFix"></image>请确保商品信息及联系方式的真实性!</view>
|
<view class="notice-tips color-orange font26 border-box pad-all20 flex"><image src="/static/icon-notice.png" mode="widthFix"></image>请确保商品信息及联系方式的真实性!</view>
|
||||||
<!-- 商品编辑 -->
|
<!-- 商品编辑 -->
|
||||||
<view class="release-form color-48 background-white border-box">
|
<view class="release-form color-48 background-white border-box">
|
||||||
|
<view class="item font26 mar-x30 flex">
|
||||||
|
<view class="title">小区选择<text class="color-red">*</text></view>
|
||||||
|
<picker mode="selector" :range="estateList" @change="choiceEstate" :value="estateIndex" :range-key="'name'">
|
||||||
|
<view class="cate-name">
|
||||||
|
<text>{{estateList[estateIndex].name}}</text>
|
||||||
|
<image src="/static/icon-arrow-down.png" mode=""></image>
|
||||||
|
</view>
|
||||||
|
</picker>
|
||||||
|
</view>
|
||||||
<view class="item font26 mar-x30 flex">
|
<view class="item font26 mar-x30 flex">
|
||||||
<view class="title">商品分类<text class="color-red">*</text></view>
|
<view class="title">商品分类<text class="color-red">*</text></view>
|
||||||
<picker mode="selector" :range="cateList" @change="choiceCate" :value="cateIndex" :range-key="'name'">
|
<picker mode="selector" :range="cateList" @change="choiceCate" :value="cateIndex" :range-key="'name'">
|
||||||
|
@ -19,15 +28,6 @@
|
||||||
<view class="title">商品名称<text class="color-red">*</text></view>
|
<view class="title">商品名称<text class="color-red">*</text></view>
|
||||||
<input type="text" v-model="goodsDetail.name" placeholder="请输入商品名称" placeholder-style="color:#8c8c9b">
|
<input type="text" v-model="goodsDetail.name" placeholder="请输入商品名称" placeholder-style="color:#8c8c9b">
|
||||||
</view>
|
</view>
|
||||||
<view class="item font26 mar-x30 flex">
|
|
||||||
<view class="title">小区选择<text class="color-red">*</text></view>
|
|
||||||
<picker mode="selector" :range="estateList" @change="choiceEstate" :value="cateIndex" :range-key="'name'">
|
|
||||||
<view class="cate-name">
|
|
||||||
<text>{{estateList[estateIndex].name}}</text>
|
|
||||||
<image src="/static/icon-arrow-down.png" mode=""></image>
|
|
||||||
</view>
|
|
||||||
</picker>
|
|
||||||
</view>
|
|
||||||
<view class="item font26 mar-x30 flex">
|
<view class="item font26 mar-x30 flex">
|
||||||
<view class="title">商品原价<text class="color-red">*</text></view>
|
<view class="title">商品原价<text class="color-red">*</text></view>
|
||||||
<input type="number" v-model="goodsDetail.original_price" placeholder="请输入商品原价" placeholder-style="color:#8c8c9b">
|
<input type="number" v-model="goodsDetail.original_price" placeholder="请输入商品原价" placeholder-style="color:#8c8c9b">
|
||||||
|
@ -36,6 +36,10 @@
|
||||||
<view class="title">商品售价<text class="color-red">*</text></view>
|
<view class="title">商品售价<text class="color-red">*</text></view>
|
||||||
<input type="number" v-model="goodsDetail.price" placeholder="请输入商品售价" placeholder-style="color:#8c8c9b">
|
<input type="number" v-model="goodsDetail.price" placeholder="请输入商品售价" placeholder-style="color:#8c8c9b">
|
||||||
</view>
|
</view>
|
||||||
|
<view class="item font26 mar-x30 flex">
|
||||||
|
<view class="title">联系方式<text class="color-red">*</text></view>
|
||||||
|
<input type="number" v-model="phone" placeholder="请输入联系方式" placeholder-style="color:#8c8c9b">
|
||||||
|
</view>
|
||||||
<view class="item font26 mar-x30 flex">
|
<view class="item font26 mar-x30 flex">
|
||||||
<view class="title">商品描述<text class="color-red">*</text></view>
|
<view class="title">商品描述<text class="color-red">*</text></view>
|
||||||
<textarea v-model="goodsDetail.msg" placeholder="请输入商品描述" placeholder-style="color:#8c8c9b"></textarea>
|
<textarea v-model="goodsDetail.msg" placeholder="请输入商品描述" placeholder-style="color:#8c8c9b"></textarea>
|
||||||
|
@ -54,18 +58,14 @@
|
||||||
<view class="title">商品图片<text class="color-red">*</text></view>
|
<view class="title">商品图片<text class="color-red">*</text></view>
|
||||||
<view class="upload-box border-box flex">
|
<view class="upload-box border-box flex">
|
||||||
<view class="img radius10 border-box" v-for="(item,index) in goodsImg" :key="index">
|
<view class="img radius10 border-box" v-for="(item,index) in goodsImg" :key="index">
|
||||||
<image :src="item.imgSrc" mode="widthFix"></image>
|
<image :src="item" mode="widthFix"></image>
|
||||||
<image class="del-btn" src="/static/icon-del.png" mode="widthFix" @tap="delImg(index)"></image>
|
<image class="del-btn" src="/static/icon-del.png" mode="widthFix" @tap="delImg(index)"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="upload-btn radius10 border-box flex" @tap="changeImg('img')" v-if="goodsImg.length<4"><image src="/static/icon-release.png" mode="widthFix"></image></view>
|
<view class="upload-btn radius10 border-box flex" @tap="changeImg('img')" v-if="goodsImg.length<4"><image src="/static/icon-release.png" mode="widthFix"></image></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item font26 mar-x30 flex">
|
|
||||||
<view class="title">联系方式<text class="color-red">*</text></view>
|
|
||||||
<input type="number" v-model="goodsDetail.phone" placeholder="请输入联系方式" placeholder-style="color:#8c8c9b">
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view class="release-btn background-blue font32 radius10 color-ff flex" @tap="addGoodsEv">提交</view>
|
||||||
<view class="release-btn background-blue font32 radius10 color-ff flex">提交</view>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
@ -81,11 +81,13 @@
|
||||||
goodsDetail:{}, //商品详情
|
goodsDetail:{}, //商品详情
|
||||||
cover:'', //封面图
|
cover:'', //封面图
|
||||||
goodsImg:[], //商品图片
|
goodsImg:[], //商品图片
|
||||||
|
phone:'', //联系电话
|
||||||
isEdit:false, //是否编辑进入
|
isEdit:false, //是否编辑进入
|
||||||
isLoading:false, //是否记载完成
|
isLoading:false, //是否记载完成
|
||||||
page:1, //页数
|
page:1, //页数
|
||||||
size:100, //条数
|
size:100, //条数
|
||||||
StagingImg:'', //暂存img
|
StagingImg:'', //暂存img
|
||||||
|
goods_id:-1, //商品id
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(op) {
|
onLoad(op) {
|
||||||
|
@ -93,34 +95,26 @@
|
||||||
// 判断是否是编辑进入
|
// 判断是否是编辑进入
|
||||||
this.isEdit = true;
|
this.isEdit = true;
|
||||||
this.pageTitle = '编辑商品';
|
this.pageTitle = '编辑商品';
|
||||||
|
// 获取商品id
|
||||||
|
this.goods_id = op.id;
|
||||||
}else{
|
}else{
|
||||||
this.pageTitle = '新增商品';
|
this.pageTitle = '新增商品';
|
||||||
|
// 获取用户信息
|
||||||
|
this.getUserInfo();
|
||||||
}
|
}
|
||||||
// 查询小区列表
|
// 查询小区列表
|
||||||
this.getEstateList();
|
this.getEstateList();
|
||||||
// 查询分类
|
|
||||||
this.getCateList();
|
|
||||||
},
|
|
||||||
onShareAppMessage(res) {
|
|
||||||
let shareObj = {
|
|
||||||
title:'老农极鲜',
|
|
||||||
path: uni.getStorageSync('page-path-options')+'?invite_code='+uni.getStorageSync('invite_code'),
|
|
||||||
imageUrl:'/static/img/shear-index.jpg',
|
|
||||||
}
|
|
||||||
// 返回shareObj
|
|
||||||
return shareObj;
|
|
||||||
},
|
|
||||||
onShareTimeline(res){
|
|
||||||
let shareObj = {
|
|
||||||
title:'老农极鲜',
|
|
||||||
query: '?invite_code='+uni.getStorageSync('invite_code'),
|
|
||||||
path: uni.getStorageSync('page-path-options')+'?invite_code='+uni.getStorageSync('invite_code'),
|
|
||||||
imageUrl:'/static/img/shear-index.jpg',
|
|
||||||
}
|
|
||||||
// 返回shareObj
|
|
||||||
return shareObj;
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 获取用户信息
|
||||||
|
getUserInfo(){
|
||||||
|
this.$requst.get('/api/v1/user/info').then(res=>{
|
||||||
|
console.log(res,'用户信息');
|
||||||
|
if(res.code==0) {
|
||||||
|
this.phone = res.data.mobile;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
// 查询小区列表
|
// 查询小区列表
|
||||||
getEstateList(){
|
getEstateList(){
|
||||||
this.$requst.get('/api/v1/goods/area').then(res=>{
|
this.$requst.get('/api/v1/goods/area').then(res=>{
|
||||||
|
@ -135,6 +129,9 @@
|
||||||
estateArr.push(obj)
|
estateArr.push(obj)
|
||||||
})
|
})
|
||||||
this.estateList = this.estateList.concat(estateArr);
|
this.estateList = this.estateList.concat(estateArr);
|
||||||
|
this.estateIndex = this.estateList.findIndex(item=> item.id === uni.getStorageSync('area_id'));
|
||||||
|
// 查询分类
|
||||||
|
this.getCateList();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -154,50 +151,82 @@
|
||||||
cateArr.push(obj)
|
cateArr.push(obj)
|
||||||
})
|
})
|
||||||
this.cateList = cateArr;
|
this.cateList = cateArr;
|
||||||
}
|
|
||||||
})
|
|
||||||
if(this.isEdit){
|
if(this.isEdit){
|
||||||
// 查询商品详情
|
// 查询商品详情
|
||||||
this.getGoodsDetail();
|
this.getGoodsDetail(this.goods_id);
|
||||||
}else{
|
}else{
|
||||||
this.isLoading = true;
|
this.isLoading = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 查询商品详情
|
// 查询商品详情
|
||||||
getGoodsDetail(){
|
getGoodsDetail(id){
|
||||||
this.goodsDetail = {
|
this.$requst.get('/api/v1/goods/detail',{id:id}).then(res=>{
|
||||||
name:'儿童自行车',
|
if(res.code == 0){
|
||||||
category_id:3,
|
console.log(res,'闲置商品详情');
|
||||||
original_price:'120.00',
|
|
||||||
price:'30.00',
|
|
||||||
phone:'18683958573',
|
|
||||||
imgSrc:'/static/index-01.png,/static/index-02.png,/static/index-03.png',
|
|
||||||
msg:'九成新儿童自行车,现在小孩到了,已经用不到了,有需要的可以联系哟!'
|
|
||||||
}
|
|
||||||
// 获取图片
|
// 获取图片
|
||||||
// this.goodsImg = this.goodsDetail.imgSrc.split(',');
|
this.goodsImg = res.data.images;
|
||||||
|
// 获取电话
|
||||||
|
this.phone = res.data.phone;
|
||||||
|
// 获取封面图
|
||||||
|
this.cover = res.data.cover;
|
||||||
// 获取当前分类
|
// 获取当前分类
|
||||||
this.cateIndex = this.cateList.findIndex(item=> item.id === this.goodsDetail.category_id);
|
this.cateIndex = this.cateList.findIndex(item=> item.name === res.data.category_name);
|
||||||
|
// 获取当前小区
|
||||||
|
this.estateIndex = this.estateList.findIndex(item=> item.name === res.data.area_name);
|
||||||
|
// 获取商品详情
|
||||||
|
this.goodsDetail = {
|
||||||
|
id:res.data.id,
|
||||||
|
name:res.data.title,
|
||||||
|
original_price:parseFloat(res.data.original_price),
|
||||||
|
price:parseFloat(res.data.price),
|
||||||
|
msg:res.data.content
|
||||||
|
};
|
||||||
|
}
|
||||||
this.isLoading = true;
|
this.isLoading = true;
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 新增闲置商品
|
// 新增or编辑闲置商品
|
||||||
addGoodsEv(){
|
addGoodsEv(){
|
||||||
let params = {
|
let params = {
|
||||||
|
id:this.goods_id!==-1?this.goods_id:'',
|
||||||
title:this.goodsDetail.name,
|
title:this.goodsDetail.name,
|
||||||
cover:this.cover,
|
cover:this.cover,
|
||||||
category_id:this.goodsDetail.category_id,
|
category_id:this.cateList[this.cateIndex].id,
|
||||||
area_id:this.goodsDetail.area_id,
|
area_id:this.estateList[this.estateIndex].id,
|
||||||
phone:this.goodsDetail.phone,
|
phone:this.phone,
|
||||||
original_price:this.goodsDetail.original_price,
|
original_price:this.goodsDetail.original_price,
|
||||||
price:this.goodsDetail.price,
|
price:this.goodsDetail.price,
|
||||||
// images:this.goodsImg.toString().replace(','),
|
images:this.goodsImg.join(','),
|
||||||
content:this.goodsDetail.msg
|
content:this.goodsDetail.msg
|
||||||
}
|
}
|
||||||
this.$requst.post('/api/v1/goods/add',params).then(res=>{
|
this.$requst.post(this.isEdit?'/api/v1/goods/edit':'/api/v1/goods/add',params).then(res=>{
|
||||||
if(res.code == 0){
|
if(res.code == 0){
|
||||||
|
if(this.isEdit){
|
||||||
|
this.$toolAll.tools.showToast('修改成功');
|
||||||
|
setTimeout(()=>{
|
||||||
|
uni.navigateBack({
|
||||||
|
delta: 1,
|
||||||
|
fail: () => {
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/idle/idle'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},500)
|
||||||
|
}else{
|
||||||
|
this.$toolAll.tools.showToast('添加成功');
|
||||||
|
setTimeout(()=>{
|
||||||
|
uni.reLaunch({
|
||||||
|
url:'/pages/idle/idle',
|
||||||
|
})
|
||||||
|
},500)
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
this.$toolAll.tools.showToast(res.msg);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -233,16 +262,11 @@
|
||||||
});
|
});
|
||||||
this.$requst.upload('/api/v1/file/upload/image',{path:this.StagingImg}).then(res=>{
|
this.$requst.upload('/api/v1/file/upload/image',{path:this.StagingImg}).then(res=>{
|
||||||
if(res.code==0) {
|
if(res.code==0) {
|
||||||
console.log(this.$hostHttp+res.data.src,1111)
|
|
||||||
if(type=='cover'){
|
if(type=='cover'){
|
||||||
this.cover = this.$hostHttp+res.data.src;
|
this.cover = this.$hostHttp+res.data.src;
|
||||||
}
|
}
|
||||||
if(type=='img'){
|
if(type=='img'){
|
||||||
let goodsObj = {};
|
this.goodsImg.push(this.$hostHttp+res.data.src);
|
||||||
goodsObj = {
|
|
||||||
imgSrc:this.$hostHttp+res.data.src
|
|
||||||
}
|
|
||||||
this.goodsImg.push(goodsObj);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title:'加载中'
|
title:'加载中'
|
||||||
});
|
});
|
||||||
this.$requst.get('/api/index/statement').then(res=>{
|
this.$requst.get('/api/v1/index/statement').then(res=>{
|
||||||
if(res.code==0){
|
if(res.code==0){
|
||||||
this.disclaimers = this.$toolAll.tools.escape2Html(res.data.content);
|
this.disclaimers = this.$toolAll.tools.escape2Html(res.data.content);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -158,8 +158,7 @@
|
||||||
display: block;
|
display: block;
|
||||||
width: 224rpx;
|
width: 224rpx;
|
||||||
height: 224rpx;
|
height: 224rpx;
|
||||||
border-radius: 100%;
|
border-radius: 18.75%;
|
||||||
border: 2rpx solid #d8d8d8;
|
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -69,6 +69,7 @@
|
||||||
this.mobile = res.data.mobile;
|
this.mobile = res.data.mobile;
|
||||||
}
|
}
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
|
|
||||||
this.isLoading = true;
|
this.isLoading = true;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
@ -68,9 +68,6 @@
|
||||||
},
|
},
|
||||||
onLoad(op) {
|
onLoad(op) {
|
||||||
this.getUserData();
|
this.getUserData();
|
||||||
},
|
|
||||||
onShow() {
|
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 获取用户信息
|
// 获取用户信息
|
||||||
|
|
BIN
static/logo.png
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 104 KiB |
After Width: | Height: | Size: 98 KiB |
|
@ -1 +0,0 @@
|
||||||
{"version":3,"sources":[],"names":[],"mappings":"","file":"components/share-coupon/share-coupon.js","sourceRoot":""}
|
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"sources":["uni-app:///main.js"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","createPage","Page"],"mappings":";;;;;;;;;;kDAAA;;;AAGA;AACA,yF,8FAHA;AACAA,EAAE,CAACC,iCAAH,GAAuCC,mBAAvC,CAGAC,UAAU,CAACC,aAAD,CAAV,C","file":"pages/cart/cart.js","sourcesContent":["import 'uni-pages';\n// @ts-ignore\nwx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;\nimport Vue from 'vue'\nimport Page from './pages/cart/cart.vue'\ncreatePage(Page)"],"sourceRoot":""}
|
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"sources":["uni-app:///main.js"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","createPage","Page"],"mappings":";;;;;;;;;;kDAAA;;;AAGA;AACA,6F,8FAHA;AACAA,EAAE,CAACC,iCAAH,GAAuCC,mBAAvC,CAGAC,UAAU,CAACC,eAAD,CAAV,C","file":"pages/cart/finish.js","sourcesContent":["import 'uni-pages';\n// @ts-ignore\nwx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;\nimport Vue from 'vue'\nimport Page from './pages/cart/finish.vue'\ncreatePage(Page)"],"sourceRoot":""}
|
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"sources":["uni-app:///main.js"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","createPage","Page"],"mappings":";;;;;;;;;;kDAAA;;;AAGA;AACA,qG,8FAHA;AACAA,EAAE,CAACC,iCAAH,GAAuCC,mBAAvC,CAGAC,UAAU,CAACC,mBAAD,CAAV,C","file":"pages/cart/settlement.js","sourcesContent":["import 'uni-pages';\n// @ts-ignore\nwx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;\nimport Vue from 'vue'\nimport Page from './pages/cart/settlement.vue'\ncreatePage(Page)"],"sourceRoot":""}
|
|
|
@ -1 +0,0 @@
|
||||||
{"version":3,"sources":["uni-app:///main.js"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","createPage","Page"],"mappings":";;;;;;;;;;kDAAA;;;AAGA;AACA,2F,8FAHA;AACAA,EAAE,CAACC,iCAAH,GAAuCC,mBAAvC,CAGAC,UAAU,CAACC,eAAD,CAAV,C","file":"pages/my/revise.js","sourcesContent":["import 'uni-pages';\n// @ts-ignore\nwx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;\nimport Vue from 'vue'\nimport Page from './pages/my/revise.vue'\ncreatePage(Page)"],"sourceRoot":""}
|
|
|
@ -1 +1 @@
|
||||||
<view class="goods-list flex data-v-108270a4"><block wx:for="{{goodsList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['goDetail',['$0'],[[['goodsList','',index,'id']]]]]]]}}" class="item background-white radius20 mar-s20 data-v-108270a4" bindtap="__e"><view class="cover radius20 data-v-108270a4"><image src="{{item.cover}}" mode="widthFix" class="data-v-108270a4"></image><block wx:if="{{isOperate}}"><view data-event-opts="{{[['tap',[['changeStateEv',['$0',index],[[['goodsList','',index,'id']]]]]]]}}" class="{{['hide-btn','font24','color-ff','radius20','flex','data-v-108270a4',item.state==0?'background-8c':'background-blue']}}" catchtap="__e">{{item.state==0?'已隐藏':'已展示'}}</view></block></view><text class="name font28 clips1 data-v-108270a4">{{item.name}}</text><view class="price flex data-v-108270a4"><text class="color-8c font24 data-v-108270a4">{{"¥"+item.original_price}}</text><text class="color-red font28 data-v-108270a4">{{"¥"+item.price}}</text></view></view></block></view>
|
<view class="goods-list flex data-v-108270a4"><block wx:for="{{goodsList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['goDetail',['$0'],[[['goodsList','',index,'id']]]]]]]}}" class="item background-white radius20 mar-s20 data-v-108270a4" bindtap="__e"><view class="cover radius20 data-v-108270a4"><image class="img data-v-108270a4" src="{{item.cover}}" mode="widthFix"></image><block wx:if="{{isOperate}}"><view data-event-opts="{{[['tap',[['changeStateEv',['$0',index],[[['goodsList','',index,'id']]]]]]]}}" class="{{['hide-btn','font24','color-ff','radius20','flex','data-v-108270a4',item.status==1?'background-8c':'background-blue']}}" catchtap="__e">{{item.status==1?'已隐藏':'已展示'}}</view></block></view><text class="name font28 clips1 data-v-108270a4">{{item.name}}</text><view class="price flex data-v-108270a4"><block wx:if="{{item.original_price!==''}}"><text class="text color-8c font24 data-v-108270a4">{{"¥"+item.original_price}}</text></block><text class="text color-red font28 data-v-108270a4">{{"¥"+item.price}}</text></view></view></block></view>
|
|
@ -18,7 +18,7 @@
|
||||||
margin-bottom: 10rpx;
|
margin-bottom: 10rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
.goods-list .cover image.data-v-108270a4{
|
.goods-list .cover .img.data-v-108270a4{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-top: 5rpx;
|
margin-top: 5rpx;
|
||||||
}
|
}
|
||||||
.goods-list .price>text.data-v-108270a4:first-child{
|
.goods-list .price>.text.data-v-108270a4:first-child{
|
||||||
margin-right: 6rpx;
|
margin-right: 6rpx;
|
||||||
text-decoration: line-through;
|
text-decoration: line-through;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
<view class="tabbar-list border-box pad-sx40 background-white pad-zy20 flex data-v-8ad7aaf8"><block wx:for="{{footBarList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['chooseFootTab',[index]]]]]}}" class="{{['tabbar-item','color-88','flex','data-v-8ad7aaf8',current==index?'active':'']}}" bindtap="__e"><view class="icon flex data-v-8ad7aaf8"><image style="{{'width:'+([41,38][index]+'rpx')+';'+('height:'+([41,40][index]+'rpx')+';')}}" src="{{item.iconPath}}" mode="widthFix" class="data-v-8ad7aaf8"></image></view><view class="title font26 data-v-8ad7aaf8">{{item.title}}</view></view></block><view data-event-opts="{{[['tap',[['goRelease',['$event']]]]]}}" class="release-btn background-blue color-ff radius100 flex data-v-8ad7aaf8" bindtap="__e"><image src="/static/icon-release.png" mode="widthFix" class="data-v-8ad7aaf8"></image></view></view>
|
<view class="tabbar-list border-box pad-sx40 background-white pad-zy20 flex data-v-8ad7aaf8"><block wx:for="{{footBarList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['chooseFootTab',[index]]]]]}}" class="{{['tabbar-item','color-88','flex','data-v-8ad7aaf8',current==index?'active':'']}}" bindtap="__e"><view class="icon flex data-v-8ad7aaf8"><image class="img data-v-8ad7aaf8" style="{{'width:'+([41,38][index]+'rpx')+';'+('height:'+([41,40][index]+'rpx')+';')}}" src="{{item.iconPath}}" mode="widthFix"></image></view><view class="title font26 data-v-8ad7aaf8">{{item.title}}</view></view></block><view data-event-opts="{{[['tap',[['goRelease',['$event']]]]]}}" class="release-btn background-blue color-ff radius100 flex data-v-8ad7aaf8" bindtap="__e"><image class="img data-v-8ad7aaf8" src="/static/icon-release.png" mode="widthFix"></image></view></view>
|
|
@ -21,7 +21,7 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 40rpx;
|
height: 40rpx;
|
||||||
}
|
}
|
||||||
.tabbar-item .icon>image.data-v-8ad7aaf8{
|
.tabbar-item .icon .img.data-v-8ad7aaf8{
|
||||||
-webkit-filter: grayscale(100%);
|
-webkit-filter: grayscale(100%);
|
||||||
filter: grayscale(100%);
|
filter: grayscale(100%);
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
.tabbar-item.active.data-v-8ad7aaf8{
|
.tabbar-item.active.data-v-8ad7aaf8{
|
||||||
color: #1981ff;
|
color: #1981ff;
|
||||||
}
|
}
|
||||||
.tabbar-item.active .icon>image.data-v-8ad7aaf8{
|
.tabbar-item.active .icon .img.data-v-8ad7aaf8{
|
||||||
-webkit-filter: grayscale(0);
|
-webkit-filter: grayscale(0);
|
||||||
filter: grayscale(0);
|
filter: grayscale(0);
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
bottom: 120rpx;
|
bottom: 120rpx;
|
||||||
z-index: 99;
|
z-index: 99;
|
||||||
}
|
}
|
||||||
.release-btn>image.data-v-8ad7aaf8{
|
.release-btn .img.data-v-8ad7aaf8{
|
||||||
width: 48rpx;
|
width: 48rpx;
|
||||||
height: 48rpx;
|
height: 48rpx;
|
||||||
}
|
}
|
||||||
|
|
|
@ -186,7 +186,7 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
size: 10, //条数
|
size: 10, //条数
|
||||||
total: 0, //总数
|
total: 0, //总数
|
||||||
isLoading: false, //是否加载完成
|
isLoading: false, //是否加载完成
|
||||||
estate: 0 //0:闲置进入,1:车位进入,2:房屋进入
|
estate: 1 //1:闲置进入,2:车位进入,3:房屋进入
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad: function onLoad(op) {
|
onLoad: function onLoad(op) {
|
||||||
|
|
|
@ -219,7 +219,8 @@ var _default =
|
||||||
goodsImg: [], //商品图片
|
goodsImg: [], //商品图片
|
||||||
showPhone: false, //显示电话号码
|
showPhone: false, //显示电话号码
|
||||||
isLoading: false, //是否加载完成
|
isLoading: false, //是否加载完成
|
||||||
type: '' //是否自己发布
|
type: '', //是否自己发布
|
||||||
|
goods_id: 0 // 商品id
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad: function onLoad(op) {
|
onLoad: function onLoad(op) {
|
||||||
|
@ -227,28 +228,28 @@ var _default =
|
||||||
this.type = op.type;
|
this.type = op.type;
|
||||||
}
|
}
|
||||||
if (op.id) {
|
if (op.id) {
|
||||||
// 查询商品列表
|
// 获取商品id
|
||||||
this.getGoodsDetail(op.id);
|
this.goods_id = op.id;
|
||||||
} else {
|
|
||||||
this.$toolAll.tools.showToast('参数不合法');
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
onShow: function onShow() {
|
||||||
|
// 查询商品详情
|
||||||
|
this.getGoodsDetail(this.goods_id);
|
||||||
},
|
},
|
||||||
onShareAppMessage: function onShareAppMessage(res) {
|
onShareAppMessage: function onShareAppMessage(res) {
|
||||||
var shareObj = {
|
var shareObj = {
|
||||||
title: '老农极鲜',
|
title: this.goodsDetail.name,
|
||||||
path: uni.getStorageSync('page-path-options') + '?invite_code=' + uni.getStorageSync('invite_code'),
|
path: this.type == 'release' ? uni.getStorageSync('page-path-options').substring(0, uni.getStorageSync('page-path-options').indexOf("&")) : uni.getStorageSync('page-path-options'),
|
||||||
imageUrl: '/static/img/shear-index.jpg' };
|
imageUrl: this.goodsDetail.cover };
|
||||||
|
|
||||||
// 返回shareObj
|
// 返回shareObj
|
||||||
return shareObj;
|
return shareObj;
|
||||||
},
|
},
|
||||||
onShareTimeline: function onShareTimeline(res) {
|
onShareTimeline: function onShareTimeline(res) {
|
||||||
var shareObj = {
|
var shareObj = {
|
||||||
title: '老农极鲜',
|
title: this.goodsDetail.name,
|
||||||
query: '?invite_code=' + uni.getStorageSync('invite_code'),
|
path: this.type == 'release' ? uni.getStorageSync('page-path-options').substring(0, uni.getStorageSync('page-path-options').indexOf("&")) : uni.getStorageSync('page-path-options'),
|
||||||
path: uni.getStorageSync('page-path-options') + '?invite_code=' + uni.getStorageSync('invite_code'),
|
imageUrl: this.goodsDetail.cover };
|
||||||
imageUrl: '/static/img/shear-index.jpg' };
|
|
||||||
|
|
||||||
// 返回shareObj
|
// 返回shareObj
|
||||||
return shareObj;
|
return shareObj;
|
||||||
|
@ -284,7 +285,7 @@ var _default =
|
||||||
// 编辑
|
// 编辑
|
||||||
editEv: function editEv(id) {
|
editEv: function editEv(id) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/release/release?id=".concat(id) });
|
url: "/pages/idle/release?id=".concat(id) });
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -293,9 +294,11 @@ var _default =
|
||||||
this.$requst.post('/api/v1/goods/del', { id: id }).then(function (res) {
|
this.$requst.post('/api/v1/goods/del', { id: id }).then(function (res) {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
_this2.$toolAll.tools.showToast('删除成功');
|
_this2.$toolAll.tools.showToast('删除成功');
|
||||||
|
setTimeout(function () {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/goods/goods" });
|
url: "/pages/goods/goods" });
|
||||||
|
|
||||||
|
}, 500);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} } };exports.default = _default;
|
} } };exports.default = _default;
|
||||||
|
|
|
@ -181,32 +181,14 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
page: 1, //页数
|
page: 1, //页数
|
||||||
size: 10, //条数
|
size: 10, //条数
|
||||||
total: 0, //总数
|
total: 0, //总数
|
||||||
isLoading: false //是否加载完成
|
isLoading: false, //是否加载完成
|
||||||
|
flag: true //改变状态
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onShow: function onShow() {
|
onShow: function onShow() {
|
||||||
// 查询商品列表
|
// 查询商品列表
|
||||||
this.getGoodsList();
|
this.getGoodsList();
|
||||||
},
|
},
|
||||||
onShareAppMessage: function onShareAppMessage(res) {
|
|
||||||
var shareObj = {
|
|
||||||
title: '老农极鲜',
|
|
||||||
path: uni.getStorageSync('page-path-options') + '?invite_code=' + uni.getStorageSync('invite_code'),
|
|
||||||
imageUrl: '/static/img/shear-index.jpg' };
|
|
||||||
|
|
||||||
// 返回shareObj
|
|
||||||
return shareObj;
|
|
||||||
},
|
|
||||||
onShareTimeline: function onShareTimeline(res) {
|
|
||||||
var shareObj = {
|
|
||||||
title: '老农极鲜',
|
|
||||||
query: '?invite_code=' + uni.getStorageSync('invite_code'),
|
|
||||||
path: uni.getStorageSync('page-path-options') + '?invite_code=' + uni.getStorageSync('invite_code'),
|
|
||||||
imageUrl: '/static/img/shear-index.jpg' };
|
|
||||||
|
|
||||||
// 返回shareObj
|
|
||||||
return shareObj;
|
|
||||||
},
|
|
||||||
onReachBottom: function onReachBottom(e) {
|
onReachBottom: function onReachBottom(e) {
|
||||||
if (this.goodsList.length < this.total) {
|
if (this.goodsList.length < this.total) {
|
||||||
this.page++;
|
this.page++;
|
||||||
|
@ -236,7 +218,8 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
cover: item.cover,
|
cover: item.cover,
|
||||||
name: item.title,
|
name: item.title,
|
||||||
original_price: item.original_price,
|
original_price: item.original_price,
|
||||||
price: item.price };
|
price: item.price,
|
||||||
|
status: item.status };
|
||||||
|
|
||||||
goodsArr.push(obj);
|
goodsArr.push(obj);
|
||||||
});
|
});
|
||||||
|
@ -248,13 +231,24 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
},
|
},
|
||||||
|
|
||||||
// 更改显示状态
|
// 更改显示状态
|
||||||
changeStateEv: function changeStateEv(id, index) {
|
changeStateEv: function changeStateEv(id, index) {var _this2 = this;
|
||||||
if (this.goodsList[index].state == 0) {
|
if (this.flag) {
|
||||||
this.goodsList[index].state = 1;
|
this.flag = false;
|
||||||
this.$toolAll.tools.showToast('状态变更成功');
|
this.$requst.post('/api/v1/goods/set-status', { id: id, status: this.goodsList[index].status == 0 ? 1 : 0 }).then(function (res) {
|
||||||
|
if (res.code == 0) {
|
||||||
|
console.log(res, '改变状态');
|
||||||
|
if (_this2.goodsList[index].status == 0) {
|
||||||
|
_this2.goodsList[index].status = 1;
|
||||||
|
_this2.$toolAll.tools.showToast('已隐藏');
|
||||||
} else {
|
} else {
|
||||||
this.goodsList[index].state = 0;
|
_this2.goodsList[index].status = 0;
|
||||||
this.$toolAll.tools.showToast('状态变更成功');
|
_this2.$toolAll.tools.showToast('已展示');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
setTimeout(function () {
|
||||||
|
_this2.flag = true;
|
||||||
|
}, 500);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -202,25 +202,25 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
// 查询商品列表
|
// 查询商品列表
|
||||||
this.getGoodsList();
|
this.getGoodsList();
|
||||||
} else {
|
} else {
|
||||||
// 查询小区列表
|
uni.navigateTo({
|
||||||
this.getEstateList();
|
url: '/pages/estate/estate?estate=1' });
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShareAppMessage: function onShareAppMessage(res) {
|
onShareAppMessage: function onShareAppMessage(res) {
|
||||||
var shareObj = {
|
var shareObj = {
|
||||||
title: '老农极鲜',
|
title: '小区闲置',
|
||||||
path: uni.getStorageSync('page-path-options') + '?invite_code=' + uni.getStorageSync('invite_code'),
|
path: uni.getStorageSync('page-path-options'),
|
||||||
imageUrl: '/static/img/shear-index.jpg' };
|
imageUrl: '/static/share-logo.png' };
|
||||||
|
|
||||||
// 返回shareObj
|
// 返回shareObj
|
||||||
return shareObj;
|
return shareObj;
|
||||||
},
|
},
|
||||||
onShareTimeline: function onShareTimeline(res) {
|
onShareTimeline: function onShareTimeline(res) {
|
||||||
var shareObj = {
|
var shareObj = {
|
||||||
title: '老农极鲜',
|
title: '小区闲置',
|
||||||
query: '?invite_code=' + uni.getStorageSync('invite_code'),
|
path: uni.getStorageSync('page-path-options'),
|
||||||
path: uni.getStorageSync('page-path-options') + '?invite_code=' + uni.getStorageSync('invite_code'),
|
imageUrl: '/static/share-logo.png' };
|
||||||
imageUrl: '/static/img/shear-index.jpg' };
|
|
||||||
|
|
||||||
// 返回shareObj
|
// 返回shareObj
|
||||||
return shareObj;
|
return shareObj;
|
||||||
|
@ -233,20 +233,8 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 查询小区列表
|
|
||||||
getEstateList: function getEstateList() {var _this = this;
|
|
||||||
this.$requst.get('/api/v1/goods/area').then(function (res) {
|
|
||||||
if (res.code == 0) {
|
|
||||||
_this.area_id = res.data.list[0].id;
|
|
||||||
_this.pageTitle = res.data.list[0].title + '-闲置商品';
|
|
||||||
// 查询商品列表
|
// 查询商品列表
|
||||||
_this.getGoodsList();
|
getGoodsList: function getGoodsList() {var _this = this;
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
// 查询商品列表
|
|
||||||
getGoodsList: function getGoodsList() {var _this2 = this;
|
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '加载中' });
|
title: '加载中' });
|
||||||
|
|
||||||
|
@ -259,7 +247,7 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
this.$requst.get('/api/v1/goods/list', params).then(function (res) {
|
this.$requst.get('/api/v1/goods/list', params).then(function (res) {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
console.log(res, '闲置商品列表');
|
console.log(res, '闲置商品列表');
|
||||||
_this2.total = res.data.total;
|
_this.total = res.data.total;
|
||||||
var goodsArr = [];
|
var goodsArr = [];
|
||||||
res.data.list.forEach(function (item) {
|
res.data.list.forEach(function (item) {
|
||||||
var obj = {
|
var obj = {
|
||||||
|
@ -271,10 +259,10 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
|
|
||||||
goodsArr.push(obj);
|
goodsArr.push(obj);
|
||||||
});
|
});
|
||||||
_this2.goodsList = _this2.goodsList.concat(goodsArr);
|
_this.goodsList = _this.goodsList.concat(goodsArr);
|
||||||
}
|
}
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
_this2.isLoading = true;
|
_this.isLoading = true;
|
||||||
});
|
});
|
||||||
} } };exports.default = _default;
|
} } };exports.default = _default;
|
||||||
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
|
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
|
||||||
|
|
|
@ -243,11 +243,13 @@ var _default =
|
||||||
goodsDetail: {}, //商品详情
|
goodsDetail: {}, //商品详情
|
||||||
cover: '', //封面图
|
cover: '', //封面图
|
||||||
goodsImg: [], //商品图片
|
goodsImg: [], //商品图片
|
||||||
|
phone: '', //联系电话
|
||||||
isEdit: false, //是否编辑进入
|
isEdit: false, //是否编辑进入
|
||||||
isLoading: false, //是否记载完成
|
isLoading: false, //是否记载完成
|
||||||
page: 1, //页数
|
page: 1, //页数
|
||||||
size: 100, //条数
|
size: 100, //条数
|
||||||
StagingImg: '' //暂存img
|
StagingImg: '', //暂存img
|
||||||
|
goods_id: -1 //商品id
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad: function onLoad(op) {
|
onLoad: function onLoad(op) {
|
||||||
|
@ -255,36 +257,28 @@ var _default =
|
||||||
// 判断是否是编辑进入
|
// 判断是否是编辑进入
|
||||||
this.isEdit = true;
|
this.isEdit = true;
|
||||||
this.pageTitle = '编辑商品';
|
this.pageTitle = '编辑商品';
|
||||||
|
// 获取商品id
|
||||||
|
this.goods_id = op.id;
|
||||||
} else {
|
} else {
|
||||||
this.pageTitle = '新增商品';
|
this.pageTitle = '新增商品';
|
||||||
|
// 获取用户信息
|
||||||
|
this.getUserInfo();
|
||||||
}
|
}
|
||||||
// 查询小区列表
|
// 查询小区列表
|
||||||
this.getEstateList();
|
this.getEstateList();
|
||||||
// 查询分类
|
|
||||||
this.getCateList();
|
|
||||||
},
|
|
||||||
onShareAppMessage: function onShareAppMessage(res) {
|
|
||||||
var shareObj = {
|
|
||||||
title: '老农极鲜',
|
|
||||||
path: uni.getStorageSync('page-path-options') + '?invite_code=' + uni.getStorageSync('invite_code'),
|
|
||||||
imageUrl: '/static/img/shear-index.jpg' };
|
|
||||||
|
|
||||||
// 返回shareObj
|
|
||||||
return shareObj;
|
|
||||||
},
|
|
||||||
onShareTimeline: function onShareTimeline(res) {
|
|
||||||
var shareObj = {
|
|
||||||
title: '老农极鲜',
|
|
||||||
query: '?invite_code=' + uni.getStorageSync('invite_code'),
|
|
||||||
path: uni.getStorageSync('page-path-options') + '?invite_code=' + uni.getStorageSync('invite_code'),
|
|
||||||
imageUrl: '/static/img/shear-index.jpg' };
|
|
||||||
|
|
||||||
// 返回shareObj
|
|
||||||
return shareObj;
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 获取用户信息
|
||||||
|
getUserInfo: function getUserInfo() {var _this = this;
|
||||||
|
this.$requst.get('/api/v1/user/info').then(function (res) {
|
||||||
|
console.log(res, '用户信息');
|
||||||
|
if (res.code == 0) {
|
||||||
|
_this.phone = res.data.mobile;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
// 查询小区列表
|
// 查询小区列表
|
||||||
getEstateList: function getEstateList() {var _this = this;
|
getEstateList: function getEstateList() {var _this2 = this;
|
||||||
this.$requst.get('/api/v1/goods/area').then(function (res) {
|
this.$requst.get('/api/v1/goods/area').then(function (res) {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
console.log(res, '小区列表');
|
console.log(res, '小区列表');
|
||||||
|
@ -296,13 +290,16 @@ var _default =
|
||||||
|
|
||||||
estateArr.push(obj);
|
estateArr.push(obj);
|
||||||
});
|
});
|
||||||
_this.estateList = _this.estateList.concat(estateArr);
|
_this2.estateList = _this2.estateList.concat(estateArr);
|
||||||
|
_this2.estateIndex = _this2.estateList.findIndex(function (item) {return item.id === uni.getStorageSync('area_id');});
|
||||||
|
// 查询分类
|
||||||
|
_this2.getCateList();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
// 查询分类
|
// 查询分类
|
||||||
getCateList: function getCateList() {var _this2 = this;
|
getCateList: function getCateList() {var _this3 = this;
|
||||||
if (this.page == 1) this.goodsList = [];
|
if (this.page == 1) this.goodsList = [];
|
||||||
this.$requst.get('/api/v1/goods/category').then(function (res) {
|
this.$requst.get('/api/v1/goods/category').then(function (res) {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
|
@ -315,51 +312,83 @@ var _default =
|
||||||
|
|
||||||
cateArr.push(obj);
|
cateArr.push(obj);
|
||||||
});
|
});
|
||||||
_this2.cateList = cateArr;
|
_this3.cateList = cateArr;
|
||||||
|
if (_this3.isEdit) {
|
||||||
|
// 查询商品详情
|
||||||
|
_this3.getGoodsDetail(_this3.goods_id);
|
||||||
|
} else {
|
||||||
|
_this3.isLoading = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (this.isEdit) {
|
|
||||||
// 查询商品详情
|
|
||||||
this.getGoodsDetail();
|
|
||||||
} else {
|
|
||||||
this.isLoading = true;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 查询商品详情
|
// 查询商品详情
|
||||||
getGoodsDetail: function getGoodsDetail() {var _this3 = this;
|
getGoodsDetail: function getGoodsDetail(id) {var _this4 = this;
|
||||||
this.goodsDetail = {
|
this.$requst.get('/api/v1/goods/detail', { id: id }).then(function (res) {
|
||||||
name: '儿童自行车',
|
if (res.code == 0) {
|
||||||
category_id: 3,
|
console.log(res, '闲置商品详情');
|
||||||
original_price: '120.00',
|
|
||||||
price: '30.00',
|
|
||||||
phone: '18683958573',
|
|
||||||
imgSrc: '/static/index-01.png,/static/index-02.png,/static/index-03.png',
|
|
||||||
msg: '九成新儿童自行车,现在小孩到了,已经用不到了,有需要的可以联系哟!' };
|
|
||||||
|
|
||||||
// 获取图片
|
// 获取图片
|
||||||
// this.goodsImg = this.goodsDetail.imgSrc.split(',');
|
_this4.goodsImg = res.data.images;
|
||||||
|
// 获取电话
|
||||||
|
_this4.phone = res.data.phone;
|
||||||
|
// 获取封面图
|
||||||
|
_this4.cover = res.data.cover;
|
||||||
// 获取当前分类
|
// 获取当前分类
|
||||||
this.cateIndex = this.cateList.findIndex(function (item) {return item.id === _this3.goodsDetail.category_id;});
|
_this4.cateIndex = _this4.cateList.findIndex(function (item) {return item.name === res.data.category_name;});
|
||||||
this.isLoading = true;
|
// 获取当前小区
|
||||||
|
_this4.estateIndex = _this4.estateList.findIndex(function (item) {return item.name === res.data.area_name;});
|
||||||
|
// 获取商品详情
|
||||||
|
_this4.goodsDetail = {
|
||||||
|
id: res.data.id,
|
||||||
|
name: res.data.title,
|
||||||
|
original_price: parseFloat(res.data.original_price),
|
||||||
|
price: parseFloat(res.data.price),
|
||||||
|
msg: res.data.content };
|
||||||
|
|
||||||
|
}
|
||||||
|
_this4.isLoading = true;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
// 新增闲置商品
|
// 新增or编辑闲置商品
|
||||||
addGoodsEv: function addGoodsEv() {
|
addGoodsEv: function addGoodsEv() {var _this5 = this;
|
||||||
var params = {
|
var params = {
|
||||||
|
id: this.goods_id !== -1 ? this.goods_id : '',
|
||||||
title: this.goodsDetail.name,
|
title: this.goodsDetail.name,
|
||||||
cover: this.cover,
|
cover: this.cover,
|
||||||
category_id: this.goodsDetail.category_id,
|
category_id: this.cateList[this.cateIndex].id,
|
||||||
area_id: this.goodsDetail.area_id,
|
area_id: this.estateList[this.estateIndex].id,
|
||||||
phone: this.goodsDetail.phone,
|
phone: this.phone,
|
||||||
original_price: this.goodsDetail.original_price,
|
original_price: this.goodsDetail.original_price,
|
||||||
price: this.goodsDetail.price,
|
price: this.goodsDetail.price,
|
||||||
// images:this.goodsImg.toString().replace(','),
|
images: this.goodsImg.join(','),
|
||||||
content: this.goodsDetail.msg };
|
content: this.goodsDetail.msg };
|
||||||
|
|
||||||
this.$requst.post('/api/v1/goods/add', params).then(function (res) {
|
this.$requst.post(this.isEdit ? '/api/v1/goods/edit' : '/api/v1/goods/add', params).then(function (res) {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
|
if (_this5.isEdit) {
|
||||||
|
_this5.$toolAll.tools.showToast('修改成功');
|
||||||
|
setTimeout(function () {
|
||||||
|
uni.navigateBack({
|
||||||
|
delta: 1,
|
||||||
|
fail: function fail() {
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/idle/idle' });
|
||||||
|
|
||||||
|
} });
|
||||||
|
|
||||||
|
}, 500);
|
||||||
|
} else {
|
||||||
|
_this5.$toolAll.tools.showToast('添加成功');
|
||||||
|
setTimeout(function () {
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/idle/idle' });
|
||||||
|
|
||||||
|
}, 500);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
_this5.$toolAll.tools.showToast(res.msg);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -375,36 +404,31 @@ var _default =
|
||||||
},
|
},
|
||||||
|
|
||||||
// 选择图片
|
// 选择图片
|
||||||
changeImg: function changeImg(type) {var _this4 = this;
|
changeImg: function changeImg(type) {var _this6 = this;
|
||||||
if (type == 'cover') this.cover = '';
|
if (type == 'cover') this.cover = '';
|
||||||
uni.chooseImage({
|
uni.chooseImage({
|
||||||
count: 1, //默认9
|
count: 1, //默认9
|
||||||
sourceType: ['album', 'camera'], //从相册选择
|
sourceType: ['album', 'camera'], //从相册选择
|
||||||
success: function success(res) {
|
success: function success(res) {
|
||||||
_this4.StagingImg = res.tempFilePaths[0];
|
_this6.StagingImg = res.tempFilePaths[0];
|
||||||
// 上传图片
|
// 上传图片
|
||||||
_this4.uploadImg(type);
|
_this6.uploadImg(type);
|
||||||
} });
|
} });
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 上传图片
|
// 上传图片
|
||||||
uploadImg: function uploadImg(type) {var _this5 = this;
|
uploadImg: function uploadImg(type) {var _this7 = this;
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '上传中' });
|
title: '上传中' });
|
||||||
|
|
||||||
this.$requst.upload('/api/v1/file/upload/image', { path: this.StagingImg }).then(function (res) {
|
this.$requst.upload('/api/v1/file/upload/image', { path: this.StagingImg }).then(function (res) {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
console.log(_this5.$hostHttp + res.data.src, 1111);
|
|
||||||
if (type == 'cover') {
|
if (type == 'cover') {
|
||||||
_this5.cover = _this5.$hostHttp + res.data.src;
|
_this7.cover = _this7.$hostHttp + res.data.src;
|
||||||
}
|
}
|
||||||
if (type == 'img') {
|
if (type == 'img') {
|
||||||
var goodsObj = {};
|
_this7.goodsImg.push(_this7.$hostHttp + res.data.src);
|
||||||
goodsObj = {
|
|
||||||
imgSrc: _this5.$hostHttp + res.data.src };
|
|
||||||
|
|
||||||
_this5.goodsImg.push(goodsObj);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
|
|
|
@ -186,7 +186,7 @@ var _default = { data: function data() {return { disclaimersHeight: "calc(100vh
|
||||||
getDisclaimers: function getDisclaimers() {var _this = this;uni.showLoading({
|
getDisclaimers: function getDisclaimers() {var _this = this;uni.showLoading({
|
||||||
title: '加载中' });
|
title: '加载中' });
|
||||||
|
|
||||||
this.$requst.get('/api/index/statement').then(function (res) {
|
this.$requst.get('/api/v1/index/statement').then(function (res) {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
_this.disclaimers = _this.$toolAll.tools.escape2Html(res.data.content);
|
_this.disclaimers = _this.$toolAll.tools.escape2Html(res.data.content);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -14,8 +14,7 @@
|
||||||
display: block;
|
display: block;
|
||||||
width: 224rpx;
|
width: 224rpx;
|
||||||
height: 224rpx;
|
height: 224rpx;
|
||||||
border-radius: 100%;
|
border-radius: 18.75%;
|
||||||
border: 2rpx solid #d8d8d8;
|
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
.logo-name.data-v-b237504c {
|
.logo-name.data-v-b237504c {
|
||||||
|
|
|
@ -226,6 +226,7 @@ var _default = {
|
||||||
_this.mobile = res.data.mobile;
|
_this.mobile = res.data.mobile;
|
||||||
}
|
}
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
|
|
||||||
_this.isLoading = true;
|
_this.isLoading = true;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -230,9 +230,6 @@ var _default =
|
||||||
},
|
},
|
||||||
onLoad: function onLoad(op) {
|
onLoad: function onLoad(op) {
|
||||||
this.getUserData();
|
this.getUserData();
|
||||||
},
|
|
||||||
onShow: function onShow() {
|
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 获取用户信息
|
// 获取用户信息
|
||||||
|
|
|
@ -18,34 +18,10 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"compileType": "miniprogram",
|
"compileType": "miniprogram",
|
||||||
"libVersion": "2.26.2",
|
"libVersion": "",
|
||||||
"appid": "wxf6f7c457ee92d2ac",
|
"appid": "wxf6f7c457ee92d2ac",
|
||||||
"projectname": "小区闲置",
|
"projectname": "小区闲置",
|
||||||
"condition": {
|
"condition": {},
|
||||||
"search": {
|
|
||||||
"current": -1,
|
|
||||||
"list": []
|
|
||||||
},
|
|
||||||
"conversation": {
|
|
||||||
"current": -1,
|
|
||||||
"list": []
|
|
||||||
},
|
|
||||||
"game": {
|
|
||||||
"current": -1,
|
|
||||||
"list": []
|
|
||||||
},
|
|
||||||
"miniprogram": {
|
|
||||||
"current": 0,
|
|
||||||
"list": [
|
|
||||||
{
|
|
||||||
"name": "",
|
|
||||||
"path": "",
|
|
||||||
"query": "",
|
|
||||||
"id": 0
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"editorSetting": {
|
"editorSetting": {
|
||||||
"tabIndent": "insertSpaces",
|
"tabIndent": "insertSpaces",
|
||||||
"tabSize": 2
|
"tabSize": 2
|
||||||
|
|
|
@ -1,20 +1,4 @@
|
||||||
{
|
{
|
||||||
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
|
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
|
||||||
"projectname": "老农极鲜土货",
|
"libVersion": "2.25.4"
|
||||||
"setting": {
|
|
||||||
"compileHotReLoad": true
|
|
||||||
},
|
|
||||||
"condition": {
|
|
||||||
"miniprogram": {
|
|
||||||
"list": [
|
|
||||||
{
|
|
||||||
"name": "",
|
|
||||||
"pathName": "pages/goods/detail",
|
|
||||||
"query": "id=0",
|
|
||||||
"launchMode": "default",
|
|
||||||
"scene": null
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 104 KiB |
After Width: | Height: | Size: 84 KiB |
After Width: | Height: | Size: 98 KiB |