修改home/index为index/index

This commit is contained in:
cc_zbp 2023-05-23 09:31:01 +08:00
parent 6ef97fbed3
commit 559f48a955
5 changed files with 1108 additions and 1033 deletions

View File

@ -4,8 +4,8 @@
<u-empty :show="jurisdiction" marginTop="260" mode="permission" :text="emptyText" <u-empty :show="jurisdiction" marginTop="260" mode="permission" :text="emptyText"
icon="http://cdn.uviewui.com/uview/empty/permission.png"></u-empty> icon="http://cdn.uviewui.com/uview/empty/permission.png"></u-empty>
<block v-if="isLogin"> <block v-if="isLogin">
<view class="special_work com" v-if="userInfoData.mer_info.type_id === 12"> <!-- <view class="special_work com" v-if="userInfoData.mer_info.type_id === 12"> -->
<!-- <view class="special_work com" v-if="true"> --> <view class="special_work com" v-if="true">
<view class="title">市级供应链</view> <view class="title">市级供应链</view>
<view class="content"> <view class="content">
<view class="examine" @click="navigator(`/pages/nongKe/supply_chain/goods_list?merid=${mer_id}`)"> <view class="examine" @click="navigator(`/pages/nongKe/supply_chain/goods_list?merid=${mer_id}`)">
@ -38,8 +38,8 @@
</view> </view>
</view> </view>
<view class="business com" v-if="userInfoData.mer_info.type_id === 10"> <!-- <view class="business com" v-if="userInfoData.mer_info.type_id === 10"> -->
<!-- <view class="business com" v-if="true"> --> <view class="business com" v-if="true">
<view class="special_work com"> <view class="special_work com">
<view class="title">我的店铺</view> <view class="title">我的店铺</view>
<view class="content "> <view class="content ">
@ -100,8 +100,8 @@
<!-- <gatherBusiness :userInfoData="userInfoData" /> --> <!-- <gatherBusiness :userInfoData="userInfoData" /> -->
</view> </view>
<view class="business com" v-if="userInfoData.mer_info.type_id === 11"> <!-- <view class="business com" v-if="userInfoData.mer_info.type_id === 11"> -->
<!-- <view class="business com" v-if="true"> --> <view class="business com" v-if="true">
<view class="special_work com"> <view class="special_work com">
<view class="title">里海云仓</view> <view class="title">里海云仓</view>
<view class="content "> <view class="content ">

View File

@ -674,12 +674,12 @@
this.getCategory(); this.getCategory();
break; break;
case 3: case 3:
this.where={ this.where = {
order: '', order: '',
keyword: '', keyword: '',
page: 1, page: 1,
limit: 30 limit: 30
}; };
this.getGoods(); this.getGoods();
break; break;
case 4: case 4:
@ -1115,14 +1115,14 @@
// //
goHome() { goHome() {
uni.switchTab({ uni.switchTab({
url: '/pages/home/index' url: '/pages/index/index'
}); });
}, },
// //
tab: function(param) { tab: function(param) {
if(this.tabActive==param){ if (this.tabActive == param) {
return false; return false;
} }
this.goods = [] this.goods = []
this.tabActive = param; this.tabActive = param;
this.goodsLoading = this.loadend = this.loading = false this.goodsLoading = this.loadend = this.loading = false

File diff suppressed because it is too large Load Diff

View File

@ -196,35 +196,36 @@
.then(({ .then(({
data data
}) => { }) => {
// #ifdef MP // #ifdef MP
//openid //openid
if (data.user.wechat_user_id === 0) { if (data.user.wechat_user_id === 0) {
let that=this let that = this
wx.getUserInfo({ wx.getUserInfo({
success: function (res) { success: function(res) {
const encryptedData = res.encryptedData const encryptedData = res.encryptedData
const iv = res.iv const iv = res.iv
wx.login({ wx.login({
success (res) { success(res) {
if (res.code) { if (res.code) {
bindMp({code: res.code, iv: iv, encryptedData: encryptedData,phone: that.account}).then(res => { bindMp({ code: res.code, iv: iv, encryptedData: encryptedData, phone: that
// console.log(res); .account }).then(res => {
}) // console.log(res);
} else { })
console.log('登录失败!' + res.errMsg) } else {
} console.log('登录失败!' + res.errMsg)
} }
}) }
}, })
fail(e) { },
console.log('登录失败!' + res.errMsg) fail(e) {
} console.log('登录失败!' + res.errMsg)
}) }
} })
// #endif }
// #endif
console.log('验证码登录', data); console.log('验证码登录', data);
let time = data.expires_time - Cache.time(); let time = data.expires_time - Cache.time();
const backUrl = that.$Cache.get(BACK_URL) || "/pages/home/index"; const backUrl = that.$Cache.get(BACK_URL) || "/pages/index/index";
that.$Cache.clear(BACK_URL); that.$Cache.clear(BACK_URL);
that.$store.commit("LOGIN", { that.$store.commit("LOGIN", {
'token': data.token, 'token': data.token,
@ -238,7 +239,7 @@
Cache.set(USER_INFO, data.user, time); Cache.set(USER_INFO, data.user, time);
// #endif // #endif
let method let method
let indexPat = ['/pages/home/index', '/pages/order_addcart/order_addcart', let indexPat = ['/pages/index/index', '/pages/order_addcart/order_addcart',
'/pages/goods_cate/goods_cate', '/pages/goods_cate/goods_cate',
'/pages/user/index' '/pages/user/index'
] ]
@ -249,7 +250,7 @@
} }
if (this.getPath(backUrl) === '/pages/users/login/index') { if (this.getPath(backUrl) === '/pages/users/login/index') {
uni.switchTab({ uni.switchTab({
url: '/pages/home/index' url: '/pages/index/index'
}); });
return return
} }

View File

@ -305,7 +305,7 @@
.then(res => { .then(res => {
that.$store.commit("LOGOUT"); that.$store.commit("LOGOUT");
uni.reLaunch({ uni.reLaunch({
url: '/pages/home/index', url: '/pages/index/index',
}); });
}) })
.catch(err => { .catch(err => {