合并代码
This commit is contained in:
parent
6e948972e8
commit
407f3b0a0f
|
@ -100,6 +100,19 @@ const intergral = {
|
||||||
data: param.data,
|
data: param.data,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取二维码
|
||||||
|
* @param {Object} param
|
||||||
|
*/
|
||||||
|
myQrcode(param) {
|
||||||
|
return util.request({
|
||||||
|
url: `/user/team/getH5Link`,
|
||||||
|
method: 'GET',
|
||||||
|
data: param.data,
|
||||||
|
responseType: 'arraybuffer',
|
||||||
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
export default intergral
|
export default intergral
|
|
@ -383,6 +383,42 @@ const shop = {
|
||||||
load: true,
|
load: true,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取订单评论规则
|
||||||
|
* @param {Object} param
|
||||||
|
*/
|
||||||
|
getCommentRules(param) {
|
||||||
|
return util.request({
|
||||||
|
url: `/shopify/commentrules/finfAll`,
|
||||||
|
data: param.data,
|
||||||
|
method: 'GET',
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品评论
|
||||||
|
* @param {Object} param
|
||||||
|
*/
|
||||||
|
addProComment(param) {
|
||||||
|
return util.request({
|
||||||
|
url: `/shopify/reviews/add`,
|
||||||
|
data: param.data,
|
||||||
|
method: 'POST',
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询商品评论列表
|
||||||
|
* @param {Object} param
|
||||||
|
*/
|
||||||
|
getProComment(param) {
|
||||||
|
return util.request({
|
||||||
|
url: `/shopify/reviews/findReviewByProductId`,
|
||||||
|
query: param.query,
|
||||||
|
method: 'GET',
|
||||||
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
export default shop
|
export default shop
|
|
@ -5,8 +5,8 @@ const config = {
|
||||||
host: 'http://localhost:5173',
|
host: 'http://localhost:5173',
|
||||||
// #endif
|
// #endif
|
||||||
// #ifndef H5
|
// #ifndef H5
|
||||||
// host: 'http://91f.xyz:8080',
|
host: 'http://91f.xyz:8080',
|
||||||
host: 'http://rud57d.natappfree.cc',
|
// host: 'http://6jv6aq.natappfree.cc ',
|
||||||
// #endif
|
// #endif
|
||||||
// 支付方式配置
|
// 支付方式配置
|
||||||
payType: {
|
payType: {
|
||||||
|
|
|
@ -116,6 +116,18 @@ const order = {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 去评价
|
||||||
|
* @param {Object} event 事件对象
|
||||||
|
*/
|
||||||
|
orderComment(event) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: util.setUrl('/pages/shop/order/evaluate', {
|
||||||
|
orderId: event.id,
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
export default order
|
export default order
|
|
@ -1503,19 +1503,18 @@ const util = {
|
||||||
isLogin(cb) {
|
isLogin(cb) {
|
||||||
// 验证
|
// 验证
|
||||||
let userinfo = uni.$store.state.userinfo
|
let userinfo = uni.$store.state.userinfo
|
||||||
// console.log('islogin userinfo', userinfo)
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
// 登录
|
// 登录
|
||||||
if (!userinfo.id) {
|
if (!userinfo.id) {
|
||||||
// util.alert('请先登录')
|
// util.alert('请先登录')
|
||||||
// 失败
|
// 失败
|
||||||
reject()
|
reject()
|
||||||
return
|
} else {
|
||||||
|
// 成功
|
||||||
|
resolve()
|
||||||
|
// 回调
|
||||||
|
cb ? cb() : ''
|
||||||
}
|
}
|
||||||
// 成功
|
|
||||||
resolve()
|
|
||||||
// 回调
|
|
||||||
cb ? cb() : ''
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -1528,7 +1527,7 @@ const util = {
|
||||||
const userinfo = store.state.userinfo
|
const userinfo = store.state.userinfo
|
||||||
|
|
||||||
// 用户id
|
// 用户id
|
||||||
if (userinfo.userId) {
|
if (userinfo.id) {
|
||||||
uni.$emit('logout') // 触发自定义事件监听
|
uni.$emit('logout') // 触发自定义事件监听
|
||||||
|
|
||||||
// tim登出
|
// tim登出
|
||||||
|
|
|
@ -71,7 +71,7 @@
|
||||||
})
|
})
|
||||||
//
|
//
|
||||||
const emit = defineEmits(['showTime', 'showComment', 'showCollect', 'showFastCollect', 'showShareFirend', 'onPlay',
|
const emit = defineEmits(['showTime', 'showComment', 'showCollect', 'showFastCollect', 'showShareFirend', 'onPlay',
|
||||||
'onPause', 'like', 'detailMenu', 'onEnd', 'longtap','dataCenter'
|
'onPause', 'like', 'detailMenu', 'onEnd', 'longtap', 'dataCenter'
|
||||||
])
|
])
|
||||||
|
|
||||||
// 视频上下文对象
|
// 视频上下文对象
|
||||||
|
@ -112,6 +112,7 @@
|
||||||
if (Math.abs(formatNumber(ratio2) - formatNumber(ratio1)) < 1) result = 'cover'
|
if (Math.abs(formatNumber(ratio2) - formatNumber(ratio1)) < 1) result = 'cover'
|
||||||
return result
|
return result
|
||||||
})
|
})
|
||||||
|
const userinfo = uni.$store.state.userinfo
|
||||||
|
|
||||||
watch(() => props.current, (nV) => {
|
watch(() => props.current, (nV) => {
|
||||||
if (nV == props.index) play()
|
if (nV == props.index) play()
|
||||||
|
@ -365,9 +366,9 @@
|
||||||
* 点赞
|
* 点赞
|
||||||
* @param {Number} index 操作的视频下标
|
* @param {Number} index 操作的视频下标
|
||||||
* @param {Number|String} likeType 点赞类型 0.公开赞 1.隐私赞
|
* @param {Number|String} likeType 点赞类型 0.公开赞 1.隐私赞
|
||||||
* @param {Number|String} isDelFlag 0.点赞 1.取消点赞
|
* @param {Number|String} isLike 0.点赞 1.取消点赞
|
||||||
*/
|
*/
|
||||||
function handleLike(index, likeType, isDelFlag) {
|
function handleLike(index, likeType, isLike) {
|
||||||
util.isLogin().then(rs => {
|
util.isLogin().then(rs => {
|
||||||
emit('like', {
|
emit('like', {
|
||||||
index,
|
index,
|
||||||
|
@ -396,12 +397,12 @@
|
||||||
if (rs.confirm) emit('like', {
|
if (rs.confirm) emit('like', {
|
||||||
index,
|
index,
|
||||||
likeType: 1,
|
likeType: 1,
|
||||||
isDelFlag: 0,
|
isLike: 0,
|
||||||
})
|
})
|
||||||
else emit('like', {
|
else emit('like', {
|
||||||
index,
|
index,
|
||||||
likeType: 2,
|
likeType: 2,
|
||||||
isDelFlag: 0,
|
isLike: 0,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
|
|
|
@ -115,7 +115,7 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="btns mtb30 rows">
|
<view class="btns mtb30 rows">
|
||||||
<view class="btn lg cancel plr40 f1" @click="$refs.pwd.close()">取消</view>
|
<view class="btn lg cancel plr40 f1" @click="$refs.pwdRef.close()">取消</view>
|
||||||
<view class="btn lg black plr40 f1" @click="handleConfirm">验证</view>
|
<view class="btn lg black plr40 f1" @click="handleConfirm">验证</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
@ -718,6 +718,13 @@
|
||||||
"navigationBarTitleText" : "继续付款",
|
"navigationBarTitleText" : "继续付款",
|
||||||
"navigationBarBackgroundColor": "#fff"
|
"navigationBarBackgroundColor": "#fff"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/login/invite",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "邀请",
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,202 @@
|
||||||
|
<script setup>
|
||||||
|
/**
|
||||||
|
* 注册账号
|
||||||
|
*/
|
||||||
|
import {
|
||||||
|
ref,
|
||||||
|
reactive,
|
||||||
|
} from 'vue'
|
||||||
|
import {
|
||||||
|
onLoad,
|
||||||
|
} from '@dcloudio/uni-app'
|
||||||
|
|
||||||
|
// 获取验证码
|
||||||
|
import getCode from '@/components/getCode/getCode.vue'
|
||||||
|
// 须知
|
||||||
|
import notice from '@/components/login/notice'
|
||||||
|
// api
|
||||||
|
import api from '@/api/index'
|
||||||
|
// 工具库
|
||||||
|
import util from '@/common/js/util.js'
|
||||||
|
// 加密
|
||||||
|
import CryptoJS from 'crypto-js';
|
||||||
|
// 显示密码
|
||||||
|
const showPwd = ref(false)
|
||||||
|
// 表单
|
||||||
|
const form = reactive({
|
||||||
|
// 手机号
|
||||||
|
phoneNumber: '',
|
||||||
|
// 密码
|
||||||
|
password: '',
|
||||||
|
// 邀请码
|
||||||
|
invitationCode: '',
|
||||||
|
// 验证码
|
||||||
|
verifyCode: '',
|
||||||
|
})
|
||||||
|
// 验证码
|
||||||
|
const cache = ref('')
|
||||||
|
// 是否阅读
|
||||||
|
const read = ref(false)
|
||||||
|
|
||||||
|
onLoad((option) => {
|
||||||
|
// 上级推荐码
|
||||||
|
if (option.code) form.invitationCode = option.code
|
||||||
|
})
|
||||||
|
|
||||||
|
// 登录
|
||||||
|
function handleLogin() {
|
||||||
|
const data = {
|
||||||
|
...form
|
||||||
|
}
|
||||||
|
// 校验
|
||||||
|
if (!data.phoneNumber) {
|
||||||
|
util.alert('请输入手机号')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!data.verifyCode) {
|
||||||
|
util.alert('请输入验证码')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!data.password) {
|
||||||
|
util.alert('请输入密码')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!data.invitationCode) {
|
||||||
|
util.alert('请输入推荐码')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!read.value) {
|
||||||
|
util.alert('请阅读并勾选服务协议》和《隐私政策》')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
data.password = CryptoJS.MD5(data.password).toString();
|
||||||
|
// 如果imei为空
|
||||||
|
if (!data.userImei) {
|
||||||
|
const info = uni.getSystemInfoSync()
|
||||||
|
//
|
||||||
|
data.userImei = info.deviceId
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
api.login.userRegister({
|
||||||
|
data: data,
|
||||||
|
path: [cache.value],
|
||||||
|
}).then(rs => {
|
||||||
|
if (rs.code == 200) {
|
||||||
|
util.alert('注册成功')
|
||||||
|
setTimeout(() => {
|
||||||
|
downloadApp()
|
||||||
|
}, 1000)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
util.alert({
|
||||||
|
content: rs.msg,
|
||||||
|
showCancel: false,
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 下载app
|
||||||
|
function downloadApp() {
|
||||||
|
// 菜单
|
||||||
|
const menu = [{
|
||||||
|
name: '安卓下载链接1',
|
||||||
|
key: 'FIR',
|
||||||
|
url: 'https://fir.xcxwo.com/8tn4qjxd'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '安卓下载链接2',
|
||||||
|
key: '蒲公英',
|
||||||
|
url: 'https://www.pgyer.com/u24vT3b2',
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
//
|
||||||
|
uni.showActionSheet({
|
||||||
|
itemList: menu.map(node => {
|
||||||
|
return node.name
|
||||||
|
}),
|
||||||
|
success: rs => {
|
||||||
|
//
|
||||||
|
location.href = menu[rs.tapIndex].url
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<view class="appbw">
|
||||||
|
<view class="container">
|
||||||
|
<view class="logo mauto">
|
||||||
|
<image class="logo" src="/static/Jiu Yi.png" mode="aspectFit" />
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="form mt60 mlr60 mb30">
|
||||||
|
<view class="title mtb30">新用户注册</view>
|
||||||
|
|
||||||
|
<view class="inputBox mtb30 ptb10 plr30">
|
||||||
|
<input type="text" v-model="form.phoneNumber" placeholder="请输入手机号" />
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="rows mtb30">
|
||||||
|
<view class="inputBox f1 ptb10 plr30">
|
||||||
|
<input type="text" v-model="form.verifyCode" placeholder="请输入验证码" class="f1" />
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="getCode btn sm ml20 plr20">
|
||||||
|
<getCode :phone="form.phoneNumber" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="inputBox rows mtb20 ptb10 plr30">
|
||||||
|
<template v-if="showPwd">
|
||||||
|
<input v-model="form.password" placeholder="请输入密码" />
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<input :password="true" v-model="form.password" placeholder="请输入密码" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<uni-icons :type="showPwd ? 'eye' : 'eye-slash'" color="#999" size="40rpx"
|
||||||
|
@click="showPwd = !showPwd" />
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="rows mtb30">
|
||||||
|
<view class="inputBox f1 ptb10 plr30">
|
||||||
|
<input type="text" v-model="form.invitationCode" placeholder="请输入推荐码" />
|
||||||
|
</view>
|
||||||
|
<view class="f1"></view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="">
|
||||||
|
<view class="btn lg bar black mtb30" @click="handleLogin">注册</view>
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<view class="btn lg bar colourful mt30" @click="downloadApp">下载app</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="footer">
|
||||||
|
<notice class="mb60" v-model:value="read" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
//
|
||||||
|
.container {
|
||||||
|
margin-top: 15vh;
|
||||||
|
|
||||||
|
// 标志
|
||||||
|
.logo {
|
||||||
|
width: 152rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取验证码
|
||||||
|
.getCode {
|
||||||
|
color: #666;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -35,6 +35,11 @@
|
||||||
const id = ref('')
|
const id = ref('')
|
||||||
// 轮播图详情
|
// 轮播图详情
|
||||||
const bannerIndex = ref(0)
|
const bannerIndex = ref(0)
|
||||||
|
// 商品评论
|
||||||
|
const comment = reactive({
|
||||||
|
list: [],
|
||||||
|
total: 0,
|
||||||
|
})
|
||||||
// 详情
|
// 详情
|
||||||
const banner = computed(() => {
|
const banner = computed(() => {
|
||||||
let result = []
|
let result = []
|
||||||
|
@ -54,6 +59,8 @@
|
||||||
addBrowsing()
|
addBrowsing()
|
||||||
// 开启监听
|
// 开启监听
|
||||||
addListener()
|
addListener()
|
||||||
|
// 获取商品评论
|
||||||
|
getProComment()
|
||||||
})
|
})
|
||||||
|
|
||||||
onReady(() => {
|
onReady(() => {
|
||||||
|
@ -84,6 +91,28 @@
|
||||||
uni.$off('commodityDetail')
|
uni.$off('commodityDetail')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取商品评论
|
||||||
|
function getProComment() {
|
||||||
|
api.shop.getProComment({
|
||||||
|
query: {
|
||||||
|
// 产品id
|
||||||
|
productionId: id.value,
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 2,
|
||||||
|
}
|
||||||
|
}).then(rs => {
|
||||||
|
if (rs.code == 200) {
|
||||||
|
comment.list = rs.rows
|
||||||
|
comment.total = rs.total
|
||||||
|
return
|
||||||
|
}
|
||||||
|
util.alert({
|
||||||
|
content: rs.msg,
|
||||||
|
showCancel: false,
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 添加商品浏览记录
|
// 添加商品浏览记录
|
||||||
function addBrowsing() {
|
function addBrowsing() {
|
||||||
// 验证登录
|
// 验证登录
|
||||||
|
@ -330,7 +359,7 @@
|
||||||
|
|
||||||
<!-- 部分评论 -->
|
<!-- 部分评论 -->
|
||||||
<view class="list">
|
<view class="list">
|
||||||
<view class="item ptb20" v-for="(item, index) in 2" :key="index">
|
<view class="item ptb20" v-for="(item, index) in comment" :key="index">
|
||||||
<view class="userinfo df c666 f28">
|
<view class="userinfo df c666 f28">
|
||||||
<image class="avatar wh45 cir"
|
<image class="avatar wh45 cir"
|
||||||
src="https://img30.360buyimg.com/popWareDetail/jfs/t1/124291/22/31317/138753/6449f30dF90683c84/4fee5d1a337f7b90.jpg.avif"
|
src="https://img30.360buyimg.com/popWareDetail/jfs/t1/124291/22/31317/138753/6449f30dF90683c84/4fee5d1a337f7b90.jpg.avif"
|
||||||
|
|
|
@ -267,7 +267,7 @@
|
||||||
<view class="btn bar closeHollow plr30" v-if="detail.afterSaleStatus === 1">
|
<view class="btn bar closeHollow plr30" v-if="detail.afterSaleStatus === 1">
|
||||||
申请平台介入</view>
|
申请平台介入</view>
|
||||||
<view class="btn bar closeHollow plr30" @click.stop="order.orderAfterSales(detail)">申请退款</view>
|
<view class="btn bar closeHollow plr30" @click.stop="order.orderAfterSales(detail)">申请退款</view>
|
||||||
<view class="btn bar warmHollow plr30">评价</view>
|
<view class="btn bar warmHollow plr30" @click.stop="order.orderComment(detail)">评价</view>
|
||||||
</template>
|
</template>
|
||||||
<!-- 已完成 -->
|
<!-- 已完成 -->
|
||||||
<template v-else-if="detail.status == 6">
|
<template v-else-if="detail.status == 6">
|
||||||
|
|
|
@ -1,66 +1,187 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
//
|
//
|
||||||
import {
|
import {
|
||||||
|
ref,
|
||||||
watch,
|
watch,
|
||||||
reactive
|
reactive,
|
||||||
|
getCurrentInstance
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
|
import {
|
||||||
|
onLoad,
|
||||||
|
onUnload,
|
||||||
|
onReachBottom,
|
||||||
|
onPullDownRefresh,
|
||||||
|
onPageScroll
|
||||||
|
} from '@dcloudio/uni-app';
|
||||||
|
// 工具库
|
||||||
|
import util from '@/common/js/util';
|
||||||
|
// api
|
||||||
|
import api from '@/api/index.js';
|
||||||
|
//
|
||||||
|
import payPwd from '@/components/mine/payPwd.vue';
|
||||||
|
|
||||||
// 商品评价
|
// 商品评价
|
||||||
const rateValue = reactive(['', '非常差', '差', '一般', '好', '非常好'])
|
const rateValue = reactive(['', '非常差', '差', '一般', '好', '非常好'])
|
||||||
//
|
// 表单
|
||||||
const form = reactive({
|
const form = reactive({
|
||||||
rate1: 0,
|
orderId: '',
|
||||||
rate2: 0,
|
productId: '',
|
||||||
rate3: 0,
|
imageUrls: [],
|
||||||
|
rating: 0,
|
||||||
|
// rate2: 0,
|
||||||
|
// rate3: 0,
|
||||||
|
})
|
||||||
|
// 榴莲果评论规则列表
|
||||||
|
const ruleList = reactive([])
|
||||||
|
// 代理
|
||||||
|
const {
|
||||||
|
proxy
|
||||||
|
} = getCurrentInstance()
|
||||||
|
|
||||||
|
onLoad((option) => {
|
||||||
|
if (option.orderId) form.orderId = option.orderId
|
||||||
|
// 获取评论规则
|
||||||
|
getCommentRules()
|
||||||
})
|
})
|
||||||
|
|
||||||
watch(form, (ev) => {
|
// 获取评论规则
|
||||||
console.log('form', ev)
|
function getCommentRules() {
|
||||||
}, {
|
api.shop.getCommentRules({}).then(res => {
|
||||||
deep: true,
|
if (res.code == 200) {
|
||||||
})
|
ruleList.length = 0
|
||||||
|
ruleList.push(...res.data)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
util.alert({
|
||||||
|
content: rs.msg,
|
||||||
|
showCancel: false,
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 上传图片
|
||||||
|
function uploadImg() {
|
||||||
|
util.upload_image({
|
||||||
|
type: 2,
|
||||||
|
success: rs => {
|
||||||
|
form.imageUrls.push(rs.value)
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 移除文件
|
||||||
|
function removeMedia(index, key) {
|
||||||
|
util.alert({
|
||||||
|
content: '确认删除?',
|
||||||
|
}).then(rs => {
|
||||||
|
if (rs.confirm) form.imageUrls.splice(index, 1)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 调用二级密码支付
|
||||||
|
function showPayPwd() {
|
||||||
|
console.log('handleSubmit data', form)
|
||||||
|
|
||||||
|
// 验证必填项
|
||||||
|
if (!form.content) {
|
||||||
|
util.alert('商品评论不能为空')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
proxy.$refs.payPwdRef.open()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 二级密码点击确认
|
||||||
|
* @param {Object} secondPassword 二级密码
|
||||||
|
*/
|
||||||
|
function handleSubmit(secondPassword) {
|
||||||
|
const data = {
|
||||||
|
...form
|
||||||
|
}
|
||||||
|
// 处理图片
|
||||||
|
data.imageUrls = data.imageUrls.join(',')
|
||||||
|
// 二级密码
|
||||||
|
data.secondPassword = secondPassword
|
||||||
|
|
||||||
|
//
|
||||||
|
api.shop.addProComment({
|
||||||
|
data,
|
||||||
|
}).then(rs => {
|
||||||
|
if (rs.code == 200) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
util.alert({
|
||||||
|
content: rs.msg,
|
||||||
|
showCancel: false,
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view class="app">
|
<view class="app">
|
||||||
<view class="container oh ptb30 imgList df fww">
|
<view class="container oh ptb30 imgList df fww">
|
||||||
<view class="imgs upload wh140">
|
<view class="imgs wh140" v-for="(item,index) in form.imageUrls" :key="index">
|
||||||
|
<image class="wh140" :src="item" mode="aspectFill" />
|
||||||
|
<view class="close" @click="removeMedia(index)">
|
||||||
|
<uni-icons type="clear" size="50rpx" color="#f00" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="imgs upload wh140" @click="uploadImg">
|
||||||
<image class="wh140" src="/static/shop-upload-image.png" mode="aspectFill" />
|
<image class="wh140" src="/static/shop-upload-image.png" mode="aspectFill" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="message container">
|
<view class="message container">
|
||||||
<textarea class="txtplus mtb20 plr20" placeholder="展开说说对商品的想法吧" placeholder-class="placeholderStyle" />
|
<textarea class="txtplus mtb20 plr20" v-model="form.content" placeholder="展开说说对商品的想法吧"
|
||||||
|
placeholder-class="placeholderStyle" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="stars container">
|
<view class="stars container">
|
||||||
<view class="item df aic mtb20">
|
<view class="item df aic mtb20">
|
||||||
<view class="key w200">描述相符</view>
|
<view class="key w200">商品评价</view>
|
||||||
<view class="value mlr20">
|
<view class="value mlr20">
|
||||||
<uni-rate v-model="form.rate1" :max="5" color="#d8d8d8" activeColor="#FF9B27" />
|
<uni-rate v-model="form.rating" :max="5" color="#d8d8d8" activeColor="#FF9B27" />
|
||||||
</view>
|
</view>
|
||||||
<view class="c999 f28">{{rateValue[form.rate1]}}</view>
|
<view class="c999 f28">{{rateValue[form.rating]}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item df aic mtb20">
|
<template v-if="0">
|
||||||
<view class="key w200">物流服务</view>
|
<view class="item df aic mtb20">
|
||||||
<view class="value mlr20">
|
<view class="key w200">物流服务</view>
|
||||||
<uni-rate v-model="form.rate2" color="#d8d8d8" activeColor="#FF9B27" />
|
<view class="value mlr20">
|
||||||
|
<uni-rate v-model="form.rate2" color="#d8d8d8" activeColor="#FF9B27" />
|
||||||
|
</view>
|
||||||
|
<view class="c999 f28">{{rateValue[form.rate2]}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="c999 f28">{{rateValue[form.rate2]}}</view>
|
<view class="item df aic mtb20">
|
||||||
|
<view class="key w200">服务态度</view>
|
||||||
|
<view class="value mlr20">
|
||||||
|
<uni-rate v-model="form.rate3" color="#d8d8d8" activeColor="#FF9B27" />
|
||||||
|
</view>
|
||||||
|
<view class="c999 f28">{{rateValue[form.rate3]}}</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 评论消耗榴莲果规则 -->
|
||||||
|
<view class="rule mtb30 mlr30">
|
||||||
|
<view class="header df aic f28">
|
||||||
|
<image class="wh30 mr10" src="/static/fruit.png" mode="aspectFit" />
|
||||||
|
<view>评论商品消耗榴莲果规则</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item df aic mtb20">
|
|
||||||
<view class="key w200">服务态度</view>
|
<view class="list mt20 c666 f24">
|
||||||
<view class="value mlr20">
|
<view class="item mtb10" v-for="(item,index) in ruleList" :key="index">{{item.description}}</view>
|
||||||
<uni-rate v-model="form.rate3" color="#d8d8d8" activeColor="#FF9B27" />
|
|
||||||
</view>
|
|
||||||
<view class="c999 f28">{{rateValue[form.rate3]}}</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<payPwd ref="payPwdRef" :check="true" @confirm='handleSubmit' />
|
||||||
|
|
||||||
<view class="fill" style="height: 120rpx;"></view>
|
<view class="fill" style="height: 120rpx;"></view>
|
||||||
|
|
||||||
<view class="footer plr30 bfff shadow">
|
<view class="footer plr30 bfff shadow">
|
||||||
<view class="btn lg primary">发布评论</view>
|
<view class="btn lg primary" @click="showPayPwd">发布评论</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
@ -77,4 +198,9 @@
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 15rpx;
|
border-radius: 15rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
.txtplus {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
|
@ -317,7 +317,8 @@
|
||||||
申请平台介入</view>
|
申请平台介入</view>
|
||||||
<view class="btn bar closeHollow plr30"
|
<view class="btn bar closeHollow plr30"
|
||||||
@click.stop="order.orderAfterSales(scope.item)">申请退款</view>
|
@click.stop="order.orderAfterSales(scope.item)">申请退款</view>
|
||||||
<view class="btn bar warmHollow plr30">评价</view>
|
<view class="btn bar warmHollow plr30"
|
||||||
|
@click.stop="order.orderComment(scope.item)">评价</view>
|
||||||
</template>
|
</template>
|
||||||
<!-- 已完成 -->
|
<!-- 已完成 -->
|
||||||
<template v-else-if="scope.item.status == 6">
|
<template v-else-if="scope.item.status == 6">
|
||||||
|
|
|
@ -4,8 +4,8 @@ import {
|
||||||
import uni from '@dcloudio/vite-plugin-uni';
|
import uni from '@dcloudio/vite-plugin-uni';
|
||||||
|
|
||||||
//
|
//
|
||||||
// let target = 'http://91f.xyz:8080'
|
let target = 'http://91f.xyz:8080'
|
||||||
let target = 'http://rud57d.natappfree.cc'
|
// let target = 'http://6jv6aq.natappfree.cc '
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [uni()],
|
plugins: [uni()],
|
||||||
|
|
Loading…
Reference in New Issue