去除不要的代码

This commit is contained in:
wangxiaowei 2024-11-27 15:46:52 +08:00
parent af8f210b71
commit 24f452390f

@ -11,7 +11,6 @@
<view class="content bg-body" v-if="appConfig.cate_style == 3 || appConfig.cate_style == 2">
<cate-one :cate-list="cateList"></cate-one>
</view>
<!-- <tabbar></tabbar> -->
</view>
</template>
@ -50,28 +49,26 @@
async onLoad(options) {
if(this.$Route.query) {
let query = this.$Route.query;
this.p_id = query.p_id ? parseInt(query.p_id) : 0;
this.set = query.set ? parseInt(query.set) : 0;
this.p_id = parseInt(query.p_id) || 0
this.set = parseInt(query.set) || 0
if (query.scene) {
let data = strToParams(decodeURIComponent(query.scene))
this.p_id = data.id ? parseInt(data.id) : 0;
this.set = data.set ? parseInt(data.set) : 0;
this.p_id = parseInt(data.id) || 0
this.set = parseInt(data.set) || 0
if (data.icde) {
const [err,res] = await uni.login()
if (err) {
this.$toast({ title: "登录失败" })
return
}
if (err) return this.$toast({ title: "登录失败" })
if (res) {
await bindSuperior({code: res.code, invite_code: data.icde})
}
}
}
}
this.$store.commit("setPid", this.p_id);
this.$store.commit("setPid", this.p_id)
this.$store.commit("setSetId", this.set)
this.$Route.query = ''
this.getLevelOneListFun();
this.getLevelOneListFun()
},
onShow() {
this.getCartNum()
@ -83,7 +80,7 @@
const {
code,
data
} = await getLevelOneList({p_id: this.p_id, set: this.set});
} = await getLevelOneList({p_id: this.p_id, set: this.set})
if (code == 1) {
this.cateList = data
}