【类 型】:
【原 因】: 【过 程】: 【影 响】:
This commit is contained in:
parent
8fa898a5f7
commit
f704e809e8
4
App.vue
4
App.vue
@ -2,13 +2,13 @@
|
||||
export default {
|
||||
// 数据初始化
|
||||
onLaunch: function(options) {
|
||||
//从二维码获取站点id 商铺id
|
||||
//从二维码获取站点id 单位id
|
||||
// 获取参数,如果不存在则使用默认值
|
||||
const shopId = options?.query?.s || '2dc23dcfecc05fb1'
|
||||
const siteId = options?.query?.z || '13'
|
||||
this.$store.commit('setShopId', String(shopId))
|
||||
this.$store.commit('setSiteId', String(siteId))
|
||||
//异步加载商铺信息
|
||||
//异步加载单位信息
|
||||
this.$store.dispatch('fetchShopCon')
|
||||
//异步加载站点列表
|
||||
this.$store.dispatch('fetchSiteList')
|
||||
|
@ -69,7 +69,7 @@
|
||||
userInfo() {
|
||||
return this.$store.state.userInfo
|
||||
},
|
||||
//商铺信息
|
||||
//单位信息
|
||||
shopCon() {
|
||||
return this.$store.state.shopCon
|
||||
},
|
||||
|
@ -105,7 +105,7 @@
|
||||
return null
|
||||
}
|
||||
},
|
||||
//商铺信息
|
||||
//单位信息
|
||||
shopCon() {
|
||||
return this.$store.state.shopCon
|
||||
},
|
||||
|
@ -170,7 +170,7 @@
|
||||
//提交
|
||||
uni.$u.http.post('/Api/Check/refundOrder', {
|
||||
order_sn: this.order_sn, //订单号
|
||||
shop_id: this.$store.state.shop_id, //商铺id
|
||||
shop_id: this.$store.state.shop_id, //单位id
|
||||
apply_price: Number(this.requestRefund_price), //申请价格
|
||||
refund_remark: this.refund_remarkDescription //退款说明
|
||||
}, {
|
||||
@ -230,7 +230,7 @@
|
||||
}
|
||||
|
||||
},
|
||||
//商铺信息
|
||||
//单位信息
|
||||
shopCon() {
|
||||
return this.$store.state.shopCon
|
||||
},
|
||||
|
@ -151,7 +151,7 @@
|
||||
siteCon() {
|
||||
return this.$store.state.siteList.find(item => item.id === this.$store.state.site_id.toString())
|
||||
},
|
||||
//商铺信息
|
||||
//单位信息
|
||||
shopCon() {
|
||||
return this.$store.state.shopCon
|
||||
},
|
||||
@ -240,7 +240,7 @@
|
||||
}
|
||||
uni.$u.http.post('/Api/Check/checkout', {
|
||||
cartList: JSON.stringify(this.cartList), //购物车列表
|
||||
shop_id: this.$store.state.shop_id, //商铺id
|
||||
shop_id: this.$store.state.shop_id, //单位id
|
||||
total: this.total, //商品总价格
|
||||
transport_price: this.transportPrice, //运费
|
||||
pack_price: this.packPrice, //打包费
|
||||
|
@ -16,7 +16,7 @@ export default {
|
||||
* spu产品图片路径
|
||||
* sku产品图片路径
|
||||
* 站点图片路径
|
||||
* 商铺logo路径
|
||||
* 单位logo路径
|
||||
*/
|
||||
"host": host,
|
||||
"baseURL": baseURL,
|
||||
|
@ -20,7 +20,7 @@ const {
|
||||
const store = new Vuex.Store({
|
||||
//全局状态
|
||||
state: {
|
||||
shop_id: null, //商铺id
|
||||
shop_id: null, //单位id
|
||||
site_id: null, //当前站点id
|
||||
userInfo: {
|
||||
name: null,
|
||||
@ -37,7 +37,7 @@ const store = new Vuex.Store({
|
||||
spuList: [], //spu列表
|
||||
skuList: [], //sku列表
|
||||
bannerList: [], //banner列表
|
||||
shopCon: {}, //商铺信息
|
||||
shopCon: {}, //单位信息
|
||||
cartList: [], //购物车列表 结构:[{"spu_id":"id","skuG":[sku_id,sku_id],"conutG":[数量,数量],"priceG":[单价,单价]},{.....}]
|
||||
|
||||
tabbarCurrent: 0, //tabbar的当前激活项
|
||||
@ -46,7 +46,7 @@ const store = new Vuex.Store({
|
||||
},
|
||||
//修改状态
|
||||
mutations: {
|
||||
//设置 二维码获取商铺id
|
||||
//设置 二维码获取单位id
|
||||
setShopId(state, shop_id) {
|
||||
state.shop_id = shop_id;
|
||||
},
|
||||
@ -108,7 +108,7 @@ const store = new Vuex.Store({
|
||||
setBannerList(state, list) {
|
||||
state.bannerList = list
|
||||
},
|
||||
//设置商铺信息
|
||||
//设置单位信息
|
||||
setShopCon(state, obj) {
|
||||
state.shopCon = obj
|
||||
},
|
||||
@ -367,7 +367,7 @@ const store = new Vuex.Store({
|
||||
})
|
||||
})
|
||||
},
|
||||
//获取商铺信息
|
||||
//获取单位信息
|
||||
async fetchShopCon({
|
||||
state,
|
||||
commit
|
||||
|
Loading…
Reference in New Issue
Block a user