去除不要的代码

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