Browse Source

互动图修改

master
dy-hu 1 year ago
parent
commit
b0b756c1c5
  1. 4
      src/App.vue
  2. 2
      src/locales/zh-CN.json
  3. 11
      src/views/interactionDiagram/components/interactionDiagramImage.vue
  4. 12
      src/views/interactionDiagram/interactionDiagramDetail.vue

4
src/App.vue

@ -30,8 +30,8 @@ export default {
methods: {
initLanguage(){
getAllLangInfo().then((res) => {
i18n.mergeLocaleMessage('en',res.data.en);
i18n.mergeLocaleMessage('zh', res.data.zh);
i18n.mergeLocaleMessage('en',res.data.data.en);
i18n.mergeLocaleMessage('zh', res.data.data.zh);
});
},
reload () {

2
src/locales/zh-CN.json

@ -331,7 +331,7 @@
"product.productbrief_en":"卖点英文简介",
"product.productbriefhint_en":"请输入卖点英文简介",
"product.productdetail_en":"商品英文详情",
"client.alreadyhasaccount":"已有账号",
"client.alreadyhasaccount":"已有账号",
"client.tologin":"去登录",
"client.registermeansagree":"注册即代表同意",
"client.appuserservice":"《APP用户服务协议》",

11
src/views/interactionDiagram/components/interactionDiagramImage.vue

@ -26,18 +26,23 @@ export default {
showPoint: {},
pointList: [],
canvasWidth: 0,
canvasHeight: 0
canvasHeight: 0,
currentPoint: []
}
},
methods: {
toProductDetail () {
if (this.currentPoint.product) {
this.$emit('clickProductDetail', {
productId: this.productData.productId
productId: this.currentPoint.product.productId,
skuId: this.currentPoint.product.skuId,
shopId: this.currentPoint.product.shopId
})
}
},
//
handleClick(row, index) {
console.log("handleClick");
this.currentPoint = row
if(this.showPoint == row){
this.showPoint = null
}else{

12
src/views/interactionDiagram/interactionDiagramDetail.vue

@ -66,7 +66,6 @@ export default {
}
this.showPointList = this.pointList.filter(item => item.product)
let productIdList = this.showPointList.map(item => item.product.productId)
const getProductsResponse = await getProducts({
ids: productIdList,
page: 1,
@ -91,13 +90,11 @@ export default {
this.$message.error(res.message || '请求失败!')
}
},
clickProductDetail(prointData) {
console.log(prointData)
if (prointData.product) {
clickProductDetail(product) {
let data = {
productId: prointData.product.productId,
skuId: prointData.product.skuId,
shopId: prointData.product.shopId
productId: product.productId,
skuId: product.skuId,
shopId: product.shopId
}
this.$router.push({
path: "/productDetail",
@ -105,7 +102,6 @@ export default {
proData: JSON.stringify(data)
}
})
}
}
}

Loading…
Cancel
Save