修复:酒道馆登录后 立即进货获取商户id失败,导致不能正常下单
This commit is contained in:
parent
0a60118afc
commit
251c8d5cb6
|
|
@ -421,7 +421,9 @@
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
let app = getApp();
|
import Cache from "../../../utils/cache";
|
||||||
|
|
||||||
|
let app = getApp();
|
||||||
import {createOrder, getOrderConfirm} from '@/api/order.js';
|
import {createOrder, getOrderConfirm} from '@/api/order.js';
|
||||||
import {getAddressDetail, getAddressList, getAgreementApi, getUserInfo} from '@/api/user.js';
|
import {getAddressDetail, getAddressList, getAgreementApi, getUserInfo} from '@/api/user.js';
|
||||||
import {openPaySubscribe} from '@/utils/SubscribeMessage.js';
|
import {openPaySubscribe} from '@/utils/SubscribeMessage.js';
|
||||||
|
|
@ -644,6 +646,8 @@
|
||||||
onLoad: function(options) {
|
onLoad: function(options) {
|
||||||
this.is_with_goods = options.is_with_goods || 0;
|
this.is_with_goods = options.is_with_goods || 0;
|
||||||
if(this.is_with_goods){
|
if(this.is_with_goods){
|
||||||
|
console.log('shopmerid:', this.shopMerId)
|
||||||
|
console.log('shopmerid-cache:', Cache.get('SHOP_MER_ID') || null)
|
||||||
getStoreDetail(this.shopMerId).then(res => {
|
getStoreDetail(this.shopMerId).then(res => {
|
||||||
this.withGoodsMerInfo = res.data;
|
this.withGoodsMerInfo = res.data;
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -34,9 +34,10 @@ const mutations = {
|
||||||
uni.removeStorageSync('auth_token');
|
uni.removeStorageSync('auth_token');
|
||||||
},
|
},
|
||||||
SHOP_LOGIN(state, opt) {
|
SHOP_LOGIN(state, opt) {
|
||||||
|
state.shopToken = opt.token;
|
||||||
|
state.shopMerId = opt.shop_mer_id;
|
||||||
Cache.set('SHOP_LOGIN_STATUS_TOKEN', opt.token, opt.time);
|
Cache.set('SHOP_LOGIN_STATUS_TOKEN', opt.token, opt.time);
|
||||||
Cache.set('SHOP_MER_ID', opt.shop_mer_id);
|
Cache.set('SHOP_MER_ID', opt.shop_mer_id);
|
||||||
state.shopToken = opt.token;
|
|
||||||
},
|
},
|
||||||
SETUID(state,val){
|
SETUID(state,val){
|
||||||
state.uid = val;
|
state.uid = val;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue