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