调整
This commit is contained in:
parent
e56b940fb5
commit
49529cd230
@ -61,8 +61,7 @@
|
|||||||
<view class="box-goods" v-for="(item,index) in integralGiftList" :key="index"
|
<view class="box-goods" v-for="(item,index) in integralGiftList" :key="index"
|
||||||
@click="godetails(item)">
|
@click="godetails(item)">
|
||||||
<view class="goods-img">
|
<view class="goods-img">
|
||||||
<image :src="baseUrl+'/static/uploadImages/20231106/75bfd9e936974f7a94c2c04e17df1d1b.png'"
|
<image :src="baseUrl+item.coverImage" mode=""></image>
|
||||||
mode=""></image>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="goods-title">
|
<view class="goods-title">
|
||||||
{{item.giftName}}
|
{{item.giftName}}
|
||||||
@ -109,7 +108,9 @@
|
|||||||
title: '',
|
title: '',
|
||||||
qhindex: -1,
|
qhindex: -1,
|
||||||
baseUrl: config.baseUrl,
|
baseUrl: config.baseUrl,
|
||||||
|
storeId: uni.getStorageSync('storeId'),
|
||||||
query: {
|
query: {
|
||||||
|
storeId: uni.getStorageSync('storeId'),
|
||||||
categoryId: '',
|
categoryId: '',
|
||||||
giftName: '',
|
giftName: '',
|
||||||
deliveryMethod: '',
|
deliveryMethod: '',
|
||||||
@ -143,19 +144,21 @@
|
|||||||
// 获取积分商城分类
|
// 获取积分商城分类
|
||||||
getCategoryList() {
|
getCategoryList() {
|
||||||
request({
|
request({
|
||||||
url: 'business/integral/integralGiftCategory/queryByPage',
|
url: 'business/integral/integralGiftCategory/queryListByStoreId',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
|
params: {
|
||||||
|
storeId: this.storeId
|
||||||
|
}
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.categoryList = res.data.records
|
this.categoryList = res.data
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 获取积分商城列表
|
// 获取积分商城列表
|
||||||
getIntegralGiftList() {
|
getIntegralGiftList() {
|
||||||
request({
|
request({
|
||||||
url: 'business/integral/integralGift/queryByPage',
|
url: 'business/integral/integralGift/queryByPageByStoreId',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: this.query
|
params: this.query
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
|
@ -57,6 +57,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
this.dataForm = {}
|
||||||
uni.$on('addressInfo', (data) => {
|
uni.$on('addressInfo', (data) => {
|
||||||
if (data != null) {
|
if (data != null) {
|
||||||
this.dataForm = data
|
this.dataForm = data
|
||||||
@ -68,8 +69,6 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
uni.$emit('unAddressInfo')
|
uni.$emit('unAddressInfo')
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
|
|
||||||
|
@ -327,9 +327,11 @@
|
|||||||
// 根据storeid 查找店铺信息
|
// 根据storeid 查找店铺信息
|
||||||
getStroeById() {
|
getStroeById() {
|
||||||
request({
|
request({
|
||||||
url: 'business/storeInformation/store',
|
url: 'business/storeInformation/store/storeInfoUni',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
// params:{}
|
params: {
|
||||||
|
storeId: uni.getStorageSync('storeId')
|
||||||
|
}
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.myPoints = res.data.points
|
this.myPoints = res.data.points
|
||||||
|
@ -87,12 +87,16 @@
|
|||||||
|
|
||||||
uni.setStorageSync('App-Token', rex.data.data
|
uni.setStorageSync('App-Token', rex.data.data
|
||||||
.token);
|
.token);
|
||||||
|
uni.setStorageSync('chainStoreId', rex.data
|
||||||
|
.data
|
||||||
|
.chainStoreId);
|
||||||
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/index/index'
|
url: '/pages/index/index'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
console.log("swq", uni.getStorageSync(
|
console.log("swq", uni.getStorageSync(
|
||||||
'App-Token'));
|
'App-Token'));
|
||||||
},
|
},
|
||||||
fail: (res) => {
|
fail: (res) => {
|
||||||
console.log("fail", res);
|
console.log("fail", res);
|
||||||
|
@ -14,9 +14,12 @@
|
|||||||
<view class="hui-size">我的积分</view>
|
<view class="hui-size">我的积分</view>
|
||||||
<view class="lan-num">{{myPoints}}</view>
|
<view class="lan-num">{{myPoints}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="anniu" @click="login">
|
<view class="anniu" @click="sign" v-if="flag">
|
||||||
积分签到
|
积分签到
|
||||||
</view>
|
</view>
|
||||||
|
<view class="anniu" v-if="!flag">
|
||||||
|
已签到
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -51,7 +54,8 @@
|
|||||||
return {
|
return {
|
||||||
title: '',
|
title: '',
|
||||||
myPoints: 0, // 我的积分
|
myPoints: 0, // 我的积分
|
||||||
|
flag: true,
|
||||||
|
storeId: uni.getStorageSync('storeId')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -60,6 +64,7 @@
|
|||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.getUserInfoList();
|
this.getUserInfoList();
|
||||||
|
this.getTodayIsSignIn();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 查询我的积分
|
// 查询我的积分
|
||||||
@ -83,9 +88,44 @@
|
|||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
},
|
},
|
||||||
|
|
||||||
// 先查询今天是否签到过
|
getTodayIsSignIn() {
|
||||||
login() {
|
|
||||||
|
|
||||||
|
request({
|
||||||
|
url: 'business/integral/integralSettings/todayIsSignIn',
|
||||||
|
method: 'get',
|
||||||
|
params: {
|
||||||
|
storeId: this.storeId
|
||||||
|
}
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
if (res.data != 0) {
|
||||||
|
this.flag = false
|
||||||
|
} else {
|
||||||
|
this.flag = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 先查询今天是否签到过
|
||||||
|
sign() {
|
||||||
|
let integralSettings = {
|
||||||
|
storeId: this.storeId
|
||||||
|
}
|
||||||
|
request({
|
||||||
|
url: 'business/integral/integralSettings/signInFunction',
|
||||||
|
method: 'post',
|
||||||
|
data: integralSettings
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
// 签到成功
|
||||||
|
uni.showToast({
|
||||||
|
title: '标题',
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
|
this.getUserInfoList();
|
||||||
|
this.getTodayIsSignIn();
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user