【类 型】:feat

【主	题】:扫码获取 shop_id site_id
【描	述】:
	[原因]:扫码获取对应站点得信息
	[过程]:
	[影响]:
【结	束】

# 类型 包含:
# feat:新功能(feature)
# fix:修补bug
# docs:文档(documentation)
# style: 格式(不影响代码运行的变动)
# refactor:重构(即不是新增功能,也不是修改bug的代码变动)
# test:增加测试
# chore:构建过程或辅助工具的变动
This commit is contained in:
tk 2024-07-15 15:37:06 +08:00
parent 9869ca7fc2
commit 27102c451b
3 changed files with 17 additions and 7 deletions

View File

@ -1,7 +1,10 @@
<script>
export default {
//
onLaunch: function() {
onLaunch: function(options) {
//id id
this.$store.commit('setShopId', options.query.s);
this.$store.commit('setSiteId', options.query.z);
//
this.$store.dispatch('fetchShopCon')
//
@ -21,7 +24,9 @@
})
},
//
onShow: function() {},
onShow: function() {
},
//
onHide: function() {},
methods: {

View File

@ -68,9 +68,6 @@
orderList() {
return this.$store.state.orderList.filter(item => item.main_status === '已付款')
}
},
onReady() {
},
onShow() {
//token

View File

@ -19,8 +19,8 @@ const {
const store = new Vuex.Store({
//全局状态
state: {
shop_id: "2dc23dcfecc05fb1", //商铺id
site_id: 1, //当前站点id
shop_id: null, //商铺id
site_id: null, //当前站点id
userInfo: {
name: null,
photo: null,
@ -44,6 +44,14 @@ const store = new Vuex.Store({
},
//修改状态
mutations: {
//设置 二维码获取商铺id
setShopId(state, shop_id) {
state.shop_id = shop_id;
},
//设置 二维码获取站点id
setSiteId(state, site_id) {
state.site_id = site_id;
},
//设置 列表页 购物车折叠显隐
setCartShow(state, val) {
Vue.set(state, 'cartShow', val)