2023-3-15
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
import store from '../store/index';
|
import store from '../store/index';
|
||||||
export default {
|
export default {
|
||||||
// qq 237524947 wx15d4269d3210863d
|
// qq 237524947 wx15d4269d3210863d
|
||||||
// BASEURI: 'http://br68s5.natappfree.cc/api/',
|
BASEURI: 'http://192.168.3.9:8111/api/',
|
||||||
BASEURI: 'http://mall.yyundong.com/portalapi/api/',
|
// BASEURI: 'http://mall.yyundong.com/portalapi/api/',
|
||||||
// BASEURI: 'http://192.168.31.52:8083/api/',
|
// BASEURI: 'http://192.168.31.52:8083/api/',
|
||||||
ADMINURI: 'http://mall.yyundong.com/adminapi/',
|
ADMINURI: 'http://mall.yyundong.com/adminapi/',
|
||||||
ESURI: 'http://www.yyundong.com:8081/',
|
ESURI: 'http://www.yyundong.com:8081/',
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
<view class="t-list">
|
<view class="t-list">
|
||||||
<view v-if="titem.pid === item.id" class="t-item" v-for="titem in tlist" :key="titem.id">
|
<view v-if="titem.pid === item.id" class="t-item" v-for="titem in tlist" :key="titem.id">
|
||||||
<image :src="titem.pic" @click="navToDetailPage(titem)"></image>
|
<image :src="titem.pic" @click="navToDetailPage(titem)"></image>
|
||||||
<text @click="navToDetailPage(titem)">{{titem.name}}</text>
|
<text @click="navToDetailPage(titem)">{{titem.name}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
statusBarHeight: '',
|
statusBarHeight: '',
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad() {
|
onShow() {
|
||||||
this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight
|
this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight
|
||||||
this.height = uni.getSystemInfoSync().windowHeight - (this.statusBarHeight + 80)
|
this.height = uni.getSystemInfoSync().windowHeight - (this.statusBarHeight + 80)
|
||||||
console.log("height", this.height);
|
console.log("height", this.height);
|
||||||
@@ -74,12 +74,16 @@
|
|||||||
methods: {
|
methods: {
|
||||||
async loadData() {
|
async loadData() {
|
||||||
|
|
||||||
let list = this.$db.get('categoryList')
|
// let list = this.$db.get('categoryList')
|
||||||
if (!list) {
|
let list=[]
|
||||||
|
this.flist =[]
|
||||||
|
this.tlist = []
|
||||||
|
// if (!list) {
|
||||||
let params = {};
|
let params = {};
|
||||||
list = await Api.apiCall('get', Api.goods.typeGoodsList, params);
|
list = await Api.apiCall('get', Api.goods.typeGoodsList, params);
|
||||||
|
console.log("list>>>>>", list);
|
||||||
this.$db.set('categoryList', list)
|
this.$db.set('categoryList', list)
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (list) {
|
if (list) {
|
||||||
list.forEach(item => {
|
list.forEach(item => {
|
||||||
@@ -245,7 +249,8 @@
|
|||||||
width: 130upx;
|
width: 130upx;
|
||||||
height: 130upx;
|
height: 130upx;
|
||||||
}
|
}
|
||||||
text{
|
|
||||||
|
text {
|
||||||
padding-left: 5px;
|
padding-left: 5px;
|
||||||
padding-right: 5px;
|
padding-right: 5px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|||||||
@@ -227,12 +227,14 @@
|
|||||||
this.userDetailInfo = {}
|
this.userDetailInfo = {}
|
||||||
this.couponList = []
|
this.couponList = []
|
||||||
this.viewList = []
|
this.viewList = []
|
||||||
|
this.listCollect = 0
|
||||||
this.getData();
|
this.getData();
|
||||||
},
|
},
|
||||||
async onShow() {
|
async onShow() {
|
||||||
this.userDetailInfo = {}
|
this.userDetailInfo = {}
|
||||||
this.couponList = []
|
this.couponList = []
|
||||||
this.viewList = []
|
this.viewList = []
|
||||||
|
this.listCollect = 0
|
||||||
this.getData();
|
this.getData();
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -308,6 +310,7 @@
|
|||||||
this.logout();
|
this.logout();
|
||||||
this.couponList = []
|
this.couponList = []
|
||||||
this.viewList = []
|
this.viewList = []
|
||||||
|
this.listCollect = 0
|
||||||
this.getHistory();
|
this.getHistory();
|
||||||
} else {
|
} else {
|
||||||
this.userDetailInfo = data1.member;
|
this.userDetailInfo = data1.member;
|
||||||
|
|||||||
@@ -9,8 +9,7 @@
|
|||||||
<text class="name">{{ addressData.name }}</text>
|
<text class="name">{{ addressData.name }}</text>
|
||||||
<text class="mobile">{{ addressData.phoneNumber }}</text>
|
<text class="mobile">{{ addressData.phoneNumber }}</text>
|
||||||
</view>
|
</view>
|
||||||
<text
|
<text class="address">{{ addressData.region }}-{{ addressData.detailAddress }}</text>
|
||||||
class="address">{{ addressData.region }}-{{ addressData.detailAddress }}</text>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="cen" v-else>
|
<view class="cen" v-else>
|
||||||
<text>请设置收货地址</text>
|
<text>请设置收货地址</text>
|
||||||
@@ -110,7 +109,7 @@
|
|||||||
<view class="price-content">
|
<view class="price-content">
|
||||||
<text>实付款</text>
|
<text>实付款</text>
|
||||||
<text class="price-tip">¥</text>
|
<text class="price-tip">¥</text>
|
||||||
<text class="price">{{ calcAmount.payAmount-coupon.amount }}</text>
|
<text class="price">{{ (calcAmount.payAmount-coupon.amount) | numFilter}}</text>
|
||||||
</view>
|
</view>
|
||||||
<text class="submit" @click="submit">提交订单</text>
|
<text class="submit" @click="submit">提交订单</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -223,6 +222,7 @@
|
|||||||
|
|
||||||
this.groupId = option.groupId;
|
this.groupId = option.groupId;
|
||||||
if (this.skuId) {
|
if (this.skuId) {
|
||||||
|
console.log(option)
|
||||||
let params = {
|
let params = {
|
||||||
orderType: 2,
|
orderType: 2,
|
||||||
groupId: option.groupId,
|
groupId: option.groupId,
|
||||||
@@ -230,6 +230,7 @@
|
|||||||
skuId: this.skuId
|
skuId: this.skuId
|
||||||
};
|
};
|
||||||
data = await Api.apiCall('post', Api.order.addGroup, params);
|
data = await Api.apiCall('post', Api.order.addGroup, params);
|
||||||
|
console.log("url1", Api.order.addGroup)
|
||||||
} else {
|
} else {
|
||||||
let params = {
|
let params = {
|
||||||
orderType: 2,
|
orderType: 2,
|
||||||
@@ -237,6 +238,7 @@
|
|||||||
goodsId: option.id
|
goodsId: option.id
|
||||||
};
|
};
|
||||||
data = await Api.apiCall('post', Api.order.addGroup, params);
|
data = await Api.apiCall('post', Api.order.addGroup, params);
|
||||||
|
console.log("url2", Api.order.addGroup)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (option.type == 1) { // 详情
|
if (option.type == 1) { // 详情
|
||||||
@@ -247,6 +249,7 @@
|
|||||||
type: option.type
|
type: option.type
|
||||||
};
|
};
|
||||||
data = await Api.apiCall('get', Api.order.preOrder, params);
|
data = await Api.apiCall('get', Api.order.preOrder, params);
|
||||||
|
console.log("url3", Api.order.preOrder)
|
||||||
} else if (option.type == 2) { // 购物车
|
} else if (option.type == 2) { // 购物车
|
||||||
let params = {
|
let params = {
|
||||||
cartIds: option.cartIds,
|
cartIds: option.cartIds,
|
||||||
@@ -254,6 +257,7 @@
|
|||||||
};
|
};
|
||||||
data = await Api.apiCall('get', Api.order.preOrder, params);
|
data = await Api.apiCall('get', Api.order.preOrder, params);
|
||||||
this.cartIds = option.cartIds;
|
this.cartIds = option.cartIds;
|
||||||
|
console.log("url4", Api.order.preOrder)
|
||||||
} else if (option.type == 6) { // 秒杀
|
} else if (option.type == 6) { // 秒杀
|
||||||
let params = {
|
let params = {
|
||||||
skillId: option.skillId,
|
skillId: option.skillId,
|
||||||
@@ -261,6 +265,7 @@
|
|||||||
};
|
};
|
||||||
data = await Api.apiCall('get', Api.order.preOrder, params);
|
data = await Api.apiCall('get', Api.order.preOrder, params);
|
||||||
this.skillId = option.skillId;
|
this.skillId = option.skillId;
|
||||||
|
console.log("url5", Api.order.preOrder)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -271,7 +276,7 @@
|
|||||||
});
|
});
|
||||||
} */
|
} */
|
||||||
/* this.memberIntegration=data.memberIntegration; */
|
/* this.memberIntegration=data.memberIntegration; */
|
||||||
/* this.basicGiftsList = data.basicGiftsList; */
|
this.basicGiftsList = data.basicGiftsList;
|
||||||
|
|
||||||
if (this.basicGiftsList) {
|
if (this.basicGiftsList) {
|
||||||
let basicGiftsVar = '';
|
let basicGiftsVar = '';
|
||||||
@@ -309,6 +314,11 @@
|
|||||||
let date = new Date(time);
|
let date = new Date(time);
|
||||||
return formatDate(date, 'yyyy-MM-dd hh:mm:ss')
|
return formatDate(date, 'yyyy-MM-dd hh:mm:ss')
|
||||||
},
|
},
|
||||||
|
numFilter(value) {
|
||||||
|
// 截取当前数据到小数点后两位
|
||||||
|
let realVal = parseFloat(value).toFixed(2)
|
||||||
|
return realVal
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getSource() {
|
getSource() {
|
||||||
|
|||||||
@@ -152,28 +152,21 @@
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
let data = await Api.apiCall('post', Api.index.simpleReg, params);
|
let data = await Api.apiCall('post', Api.index.simpleReg, params);
|
||||||
|
console.log("1111111111",data);
|
||||||
if(data.data.code==500){
|
if(data){
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
mask: true,
|
mask: true,
|
||||||
title:data.data.data,
|
title: vel ? "恭喜您注册成功,并成为惠农会员。" : "恭喜您注册成功。",
|
||||||
duration: 2000
|
duration: 2000
|
||||||
|
|
||||||
});
|
});
|
||||||
return
|
setTimeout(function() {
|
||||||
|
that.request();
|
||||||
|
}, 3000);
|
||||||
}
|
}
|
||||||
|
|
||||||
uni.showToast({
|
|
||||||
icon: 'none',
|
|
||||||
mask: true,
|
|
||||||
title: vel ? "恭喜您注册成功,并成为惠农会员。" : "恭喜您注册成功。",
|
|
||||||
duration: 2000
|
|
||||||
|
|
||||||
});
|
|
||||||
setTimeout(function() {
|
|
||||||
that.request();
|
|
||||||
}, 3000);
|
|
||||||
},
|
},
|
||||||
async request() {
|
async request() {
|
||||||
var that = this;
|
var that = this;
|
||||||
|
|||||||
@@ -181,6 +181,7 @@
|
|||||||
let params = {};
|
let params = {};
|
||||||
let data = await Api.apiCall('get', Api.index.listMemberCoupon, params);
|
let data = await Api.apiCall('get', Api.index.listMemberCoupon, params);
|
||||||
let viewList = data;
|
let viewList = data;
|
||||||
|
console.log("viewList》》》》",viewList);
|
||||||
viewList.forEach(item => {
|
viewList.forEach(item => {
|
||||||
if (item.useStatus == 0) {
|
if (item.useStatus == 0) {
|
||||||
this.couponValidList.push(item);
|
this.couponValidList.push(item);
|
||||||
|
|||||||
Reference in New Issue
Block a user