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