Browse Source

上传

master
前端-胡立永 1 month ago
parent
commit
2c8ee281db
5 changed files with 65 additions and 19 deletions
  1. +4
    -1
      config.js
  2. +1
    -1
      pages/index/center.vue
  3. +31
    -13
      pages_order/mine/promotion.vue
  4. +19
    -0
      pages_order/product/productDetail.vue
  5. +10
    -4
      store/store.js

+ 4
- 1
config.js View File

@ -6,11 +6,14 @@ import uvUI from '@/uni_modules/uv-ui-tools'
Vue.use(uvUI);
// 当前环境
const type = 'prod'
const type = 'local'
// 环境配置
const config = {
local : {
baseUrl: 'http://127.0.0.1:8001/jewelry-admin',
},
dev: {
baseUrl: 'http://h5.xzaiyp.top/jewelry-admin',
},


+ 1
- 1
pages/index/center.vue View File

@ -354,7 +354,7 @@
.earnings {
padding: 0rpx 20rpx;
box-sizing: border-box;
margin-top: -18%;
margin-top: -80rpx;
.member-item {
position: relative;


+ 31
- 13
pages_order/mine/promotion.vue View File

@ -9,7 +9,7 @@
<image
class="image"
:src="imagePath" mode="aspectFill"></image>
:src="promotionUrl" mode="aspectFill"></image>
<canvas id="myCanvas" type="2d" canvas-id="firstCanvas1"></canvas>
@ -36,7 +36,8 @@ import index from '../../uni_modules/uv-ui-tools'
title: '',
baseUrl: 'https://image.hhlm1688.com/',
canvas: {},
imagePath: 'https://image.hhlm1688.com/2025-03-06/32fbb8e2-160b-4cbf-9a49-a72de231de20.png',
imagePath : '',
// imagePath: 'https://image.hhlm1688.com/2025-03-06/32fbb8e2-160b-4cbf-9a49-a72de231de20.png',
// imagePath: 'https://image.hhlm1688.com/2025-02-27/2fe7e417-54ad-4911-b9ba-84ac7d48e66d.png',
// imagePath: 'https://image.hhlm1688.com/2025-02-26/6539d2fa-558d-47db-9681-ecffec5b6c5d.png',
index : 0,
@ -45,30 +46,47 @@ import index from '../../uni_modules/uv-ui-tools'
onShow() {
let that = this;
// that.draw()
// if(!that.promotionUrl){
if(!that.promotionUrl){
// that.getQrCode()
// uni.showLoading({
// title: "..."
// })
// }
this.getImageInfo()
}
// that.$store.commit('getUserInfo')
},
methods: {
getImageInfo(){
let that = this;
uni.showLoading({
title: "拼命绘画中..."
})
uni.getImageInfo({
src: `${this.$config.baseUrl}/info_common/getInviteCode?token=${uni.getStorageSync('token')}`,
success : res => {
uni.hideLoading()
that.$store.commit('setPromotionUrl', res.path)
},
fail : err => {
uni.showToast({
icon: 'none',
title: '绘画失败',
})
}
})
},
getQrCode() {
// uni.showLoading({
// title: "..."
// })
uni.showLoading({
title: "拼命绘画中..."
})
let that = this;
that.$api('getInviteCode', res => {
if (res.code == 200) {
that.url = res.result.url
that.title = res.result.name
// that.imagePath = that.$config.aliOss.url + res.result.url
that.imagePath = that.$config.aliOss.url + res.result.url
// that.$store.commit('setPromotionUrl', that.imagePath)
that.$store.commit('setPromotionUrl', that.imagePath)
that.draw()
// that.draw()
uni.hideLoading()
}
})


+ 19
- 0
pages_order/product/productDetail.vue View File

@ -2,6 +2,14 @@
<view class="page">
<!-- 导航栏 -->
<!-- <navbar title="商品详情" leftClick @leftClick="$utils.navigateBack" /> -->
<view class="leftClick"
@click="$utils.navigateBack">
<uv-icon
size="30rpx"
color="#fff"
name="arrow-left"></uv-icon>
</view>
<view class="swipe">
<uv-swiper :list="productDetail.image
@ -192,6 +200,17 @@
<style scoped lang="scss">
.page {
padding-bottom: 120rpx;
.leftClick{
position: absolute;
top: calc(var(--status-bar-height) + 20rpx);
left: 20rpx;
background-color: #00000073;
padding: 20rpx;
border-radius: 50%;
z-index: 99;
}
.swipe {}
//


+ 10
- 4
store/store.js View File

@ -145,11 +145,17 @@ const store = new Vuex.Store({
},
getQrCode(state) {
api('getInviteCode', res => {
if (res.code == 200) {
state.promotionUrl = Vue.prototype.$config.aliOss.url + res.result.url
let that = this;
if(!uni.getStorageSync('token')){
return
}
uni.getImageInfo({
src: `${Vue.prototype.$config.baseUrl}/info_common/getInviteCode?token=${uni.getStorageSync('token')}`,
success : res => {
that.commit('setPromotionUrl', res.path)
},
fail : err => {
}
uni.hideLoading()
})
},
// 查询分类接口


Loading…
Cancel
Save