In the upcoming era of 6G, the accelerated development of the Internet of Everything and high-speed communication is poised to provide people with an efficient and intelligent life experience. However, the exponential growth in data traffic is expected to pose substantial task processing challenges. Relying solely on the computational resources of individual devices may struggle to meet the demand for low latency. Additionally, the lack of trust between different devices poses a limitation to the development of 6G networks. In response to this issue, this study proposes a blockchain-based 6G task offloading and collaborative computational resource allocation (CERMTOB) algorithm. The proposed first designs a blockchain-based 6G cloud-network-edge collaborative task offloading model. It incorporates a blockchain network on the edge layer to improve trust between terminals and blockchain nodes. Subsequently, the optimization objective is established to minimize the total latency of offloading, computation, and blockchain consensus. The optimal offloading scheme is determined using the wolf fish collaborative search algorithm(WF-CSA) to minimize the total delay. Simulation results show that the WF-CSA algorithm significantly reduces the total delay by up to 42.58% compared to the fish swarm algorithm, wolf pack algorithm and binary particle swarm optimisation algorithm. Furthermore, the introduction of blockchain to the cloud-side-end offloading system improves the communication success rate by a maximum of 14.93% compared to the blockchain-free system.